Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapting new iteminfo format for 3.15 #1

Merged
merged 1 commit into from
Aug 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions resources/ahk/POE-ItemInfo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -6943,6 +6943,7 @@ PreProcessContents(CBContents)

; Remove the line that indicates an item cannot be used due to missing character stats
; Matches "Rarity: ..." + anything until "--------"\r\n
CBContents:= SubStr(CBContents, InStr(CBContents,"`n") + 1)
If (RegExMatch(CBContents, "s)^(.+?:.+?\r\n)(.+?-{8}\r\n)(.*)", match)) {
; Matches any ".", looking for the 2 sentences saying "You cannot use this item. Its stats will be ignored."
; Could be improved, should suffice though because the alternative would be the item name/type, which can't have any dots.
Expand Down Expand Up @@ -7365,12 +7366,7 @@ ParseItemName(ItemDataChunk, ByRef ItemName, ByRef ItemBaseName, AffixCount = ""

Loop, Parse, ItemDataChunk, `n, `r
{
If (StrLen(A_LoopField) == 0 or A_LoopField == "--------" or A_Index > 4)
{
return
}

If (A_Index = 2)
If (A_Index == 1)
{
IfNotInString, A_LoopField, Rarity:
{
Expand All @@ -7381,7 +7377,13 @@ ParseItemName(ItemDataChunk, ByRef ItemName, ByRef ItemBaseName, AffixCount = ""
Continue
}
}
If (A_Index = 3)

If (StrLen(A_LoopField) == 0 or A_LoopField == "--------" or A_Index > 3)
{
return
}

If (A_Index = 2)
{
If InStr(A_LoopField, ">>")
{
Expand Down Expand Up @@ -7432,7 +7434,7 @@ ParseItemName(ItemDataChunk, ByRef ItemName, ByRef ItemBaseName, AffixCount = ""
}
}
}
If (A_Index = 4)
If (A_Index = 3)
{
ItemBaseName := A_LoopField
}
Expand Down Expand Up @@ -13408,4 +13410,4 @@ ShowHotKeyConflictUI(hkeyObj, hkey, hkeyLabel, oldLabel = "", preventedAssignmen


; ############ (user) macros #############
; macros are being appended here by merge script
; macros are being appended here by merge script