Skip to content

Commit

Permalink
forcing abyssal sockets for the default search
Browse files Browse the repository at this point in the history
  • Loading branch information
Eruyome committed Nov 18, 2018
1 parent 8094b4c commit ac9f975
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
Binary file modified Fallback.exe
Binary file not shown.
1 change: 1 addition & 0 deletions resources/Updates_Trade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The following is a list of what has been updated, starting with 1.1.0
** Requires a successfully loaded custom loot filter.
** This feature is part of `Additional Macros` and can be changed/disabled in the respective settings tab.
** Probably not bug-free at this point.
* Changed the default search to force the number of Abyssal Sockets if the item has any. So far this was only possible by using the advanced search.
* Updated all data files, as usual (uniques etc).
* Changed requests to poe.ninja to use HTTPS instead of HTTP.

Expand Down
12 changes: 7 additions & 5 deletions resources/ahk/POE-ItemInfo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ class Item_ {
This.MapTier := ""
This.MaxSockets := ""
This.Sockets := ""
This.AbyssalSockets := ""
This.SocketGroups := []
This.Links := ""
This.SubType := ""
Expand Down Expand Up @@ -7429,7 +7430,7 @@ ParseLinks(ItemDataText)
return HighestLink
}

ParseSockets(ItemDataText)
ParseSockets(ItemDataText, ByRef AbyssalSockets)
{
SocketsCount := 0

Expand All @@ -7438,11 +7439,11 @@ ParseSockets(ItemDataText)
If (RegExMatch(A_LoopField, "i)^Sockets\s?+:"))
{
LinksString := GetColonValue(A_LoopField)
RegExReplace(LinksString, "i)[RGBWDA]", "", SocketsCount) ; "D" is being used for Resonator sockets, "A" for Abyssal Sockets
RegExReplace(LinksString, "i)[RGBWDA]", "", SocketsCount) ; "D" is being used for Resonator sockets, "A" for Abyssal Sockets
RegExReplace(LinksString, "i)[A]", "", AbyssalSockets) ; "A" for Abyssal Sockets
Break
}
}

return SocketsCount
}

Expand Down Expand Up @@ -7932,9 +7933,10 @@ ParseItemData(ItemDataText, ByRef RarityLevel="")

ItemData.Links := ParseLinks(ItemDataText)
Item.Links := ItemData.Links
ItemData.Sockets := ParseSockets(ItemDataText)
ItemData.Sockets := ParseSockets(ItemDataText, ItemAbyssalSockets)
Item.Sockets := ItemData.Sockets
Item.SocketGroups := ParseSocketGroups(ItemDataText)
Item.AbyssalSockets := ItemAbyssalSockets
Item.SocketGroups := ParseSocketGroups(ItemDataText)

Item.Charges := ParseCharges(ItemData.Stats)

Expand Down
14 changes: 13 additions & 1 deletion resources/ahk/TradeMacro.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,17 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva
}
}

/*
handle abyssal sockets for the default search
*/
If (AdvancedPriceCheckItem.mods.length() <= 0) {
If (Item.AbyssalSockets > 0) {
RequestParams.sockets_a_min := Item.AbyssalSockets
RequestParams.sockets_a_max := Item.AbyssalSockets
Item.UsedInSearch.AbyssalSockets := (Item.AbyssalSockets > 0) ? Item.AbyssalSockets : ""
}
}

/*
make sure to not look for unique items when searching rare/white/magic items
*/
Expand All @@ -862,7 +873,7 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva

/*
add genus
*/
*/
If (not isAdvancedPriceCheckRedirect) {
modParam := new _ParamMod()
modParam.mod_name := TradeFunc_FindInModGroup(TradeGlobals.Get("ModsData")["bestiary"], Item.BeastData.GenusMod)
Expand Down Expand Up @@ -2640,6 +2651,7 @@ TradeFunc_ParseHtml(html, payload, iLvl = "", ench = "", isItemAgeRequest = fals
Title .= (Item.UsedInSearch.Enchantment) ? "Enchantment " : ""
Title .= (Item.UsedInSearch.CorruptedMod) ? "Corr. Implicit " : ""
Title .= (Item.UsedInSearch.Sockets) ? "| " . Item.UsedInSearch.Sockets . "S " : ""
Title .= (Item.UsedInSearch.AbyssalSockets) ? "| " . Item.UsedInSearch.AbyssalSockets . " Abyss Sockets " : ""
Title .= (Item.UsedInSearch.Links) ? "| " . Item.UsedInSearch.Links . "L " : ""
If (Item.UsedInSearch.iLvl.min and Item.UsedInSearch.iLvl.max) {
Title .= "| iLvl (" . Item.UsedInSearch.iLvl.min . "-" . Item.UsedInSearch.iLvl.max . ")"
Expand Down

0 comments on commit ac9f975

Please sign in to comment.