diff --git a/resources/Updates_Trade.txt b/resources/Updates_Trade.txt index c34cd905..ebc1d6b4 100644 --- a/resources/Updates_Trade.txt +++ b/resources/Updates_Trade.txt @@ -1,5 +1,9 @@ The following is a list of what has been updated, starting with 1.1.0 +2.14.2 +================================================================================================ +* Fixed event leagues not being parsed and therefore not being available in the league selection. + 2.14.1 ================================================================================================ * Hotfixed the parsing of crafted mords (advanced search) which was broken in PoE 3.6. diff --git a/resources/VersionTrade.txt b/resources/VersionTrade.txt index bed2bde6..e3724a95 100644 --- a/resources/VersionTrade.txt +++ b/resources/VersionTrade.txt @@ -1,2 +1,2 @@ -TradeReleaseVersion := "v2.14.1" +TradeReleaseVersion := "v2.14.2" TradeAHKVersionRequired := "1.1.26.00" diff --git a/resources/ahk/POE-ItemInfo.ahk b/resources/ahk/POE-ItemInfo.ahk index 252fbc95..679281ec 100644 --- a/resources/ahk/POE-ItemInfo.ahk +++ b/resources/ahk/POE-ItemInfo.ahk @@ -346,6 +346,7 @@ class Item_ { This.GemColor := "" This.veiledPrefixCount := "" This.veiledSuffixCount := "" + This.fracturedModsCount := "" This.HasImplicit := False This.HasEnchantment := False @@ -8096,7 +8097,10 @@ ParseItemData(ItemDataText, ByRef RarityLevel="") If (Item.IsLeagueStone or Item.IsScarab) { ItemDataIndexAffixes := ItemDataIndexAffixes - 1 } - If (Item.IsBeast) { + Else If (Item.IsProphecy) { + ItemDataIndexAffixes := ItemDataIndexAffixes - 1 + } + Else If (Item.IsBeast) { ItemDataIndexAffixes := ItemDataIndexAffixes - 1 } ItemData.Affixes := RegExReplace(ItemDataParts%ItemDataIndexAffixes%, "[\r\n]+([a-z])", " $1") @@ -8151,6 +8155,9 @@ ParseItemData(ItemDataText, ByRef RarityLevel="") { ParseAffixes(ItemData.Affixes, Item) } + Else If (Item.IsProphecy) { + ParseAffixes(ItemData.Affixes, Item) + } Else If (RarityLevel > 1 and RarityLevel < 4 and Item.IsMap = True) { MapModWarnings := ParseMapAffixes(ItemData.Affixes) @@ -8180,6 +8187,7 @@ ParseItemData(ItemDataText, ByRef RarityLevel="") Item.BaseName := ItemBaseName pseudoMods := PreparePseudoModCreation(ItemData.Affixes, Item.Implicit, RarityLevel, Item.isMap) + fracturedModsCount := ; can't be reliably determined that easily since a hybrid mod (which counts as as single ractured mod) gets displayed as two fractured mods in the item data ; Start assembling the text for the tooltip TT := Item.Name diff --git a/resources/ahk/TradeMacro.ahk b/resources/ahk/TradeMacro.ahk index e195997a..cad22835 100644 --- a/resources/ahk/TradeMacro.ahk +++ b/resources/ahk/TradeMacro.ahk @@ -689,10 +689,10 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva If (s.mods[A_Index].selected > 0) { modParam := new _ParamMod() - If (s.mods[A_Index].spawntype = "fractured" and s.inlcudeFractured) { + If (s.mods[A_Index].spawntype = "fractured" and s.includeFractured) { modParam.mod_name := TradeFunc_FindInModGroup(TradeGlobals.Get("ModsData")["fractured"], s.mods[A_Index]) } - + If (not StrLen(modParam.mod_name)) { modParam.mod_name := s.mods[A_Index].param } @@ -702,6 +702,19 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva RequestParams.modGroups[1].AddMod(modParam) } } + If (s.includeFracturedCount and s.fracturedCount > 0) { + modParam := new _ParamMod() + modParam.mod_name := "(pseudo) # Fractured Modifiers" ; TradeFunc_FindInModGroup(TradeGlobals.Get("ModsData")["pseudo"], "# Fractured Modifiers") + /* + _tmpitem := {} + _tmpitem.mods := [] + _tmpitem.mods.push({name : "# Fractured Modifiers"}) + modParam.mod_name := TradeFunc_GetItemsPoeTradeMods(_tmpitem) + */ + modParam.mod_min := s.fracturedCount + modParam.mod_max := s.fracturedCount + RequestParams.modGroups[1].AddMod(modParam) + } Loop % s.stats.Length() { If (s.stats[A_Index].selected > 0) { ; defense @@ -1307,6 +1320,22 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva ;Item.UsedInSearch.abyssJewel := 1 } } + + /* + prophecies + */ + If (Item.IsProphecy and RegExMatch(Item.Name, "i)A Master seeks Help")) { + _tempItem := {} + _tempItem.name_orig := "(prophecy) " ItemData.Affixes + _tempItem.name := "(prophecy) " ItemData.Affixes + _tempItem.param := "(prophecy) " ItemData.Affixes + + modParam := new _ParamMod() + modParam.mod_name := _tempItem.param + modParam.mod_min := + modParam.mod_max := + RequestParams.modGroups[1].AddMod(modParam) + } /* predicted pricing (poeprices.info - machine learning) @@ -5101,6 +5130,12 @@ TradeFunc_AdvancedPriceCheckGui(advItem, Stats, Sockets, Links, UniqueStats = "" GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-" 193 " yp+" fracturedImageShift - 1 " w15 h-1 0x0100", "FracturedInfo", "FracturedInfoH", "", "", "SelectModsGui") AddToolTip(LblFracturedInfoH, "Includes selected fractured mods with their ""fractured"" porperty`n instead of as normal mods.") + + GuiAddText("Fractured mods count", "x" RightPosText " y+10 right w130 0x0100", "LblFracturedCount", "LblFracturedCountH", "", "", "SelectModsGui") + Gui, SelectModsGui:Add, CheckBox, x%RightPos% yp+0 vTradeAdvancedSelectedFracturedCount Checked, % " " + Gui, SelectModsGui:Add, Edit , x+1 yp-4 w30 vTradeAdvancedFracturedCount , + GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-" 193 " yp+" 3 " w15 h-1 0x0100", "FracturedCount", "FracturedCountH", "", "", "SelectModsGui") + AddToolTip(LblFracturedCountH, "The correct number of fractured mods can't be determined from the item data reliably.`n`nMake sure to check it by pressing ""Alt"" when hovering over your item, `nwhich requires ""Advanced Mod Descriptions"" to be enabled.") } If (ModNotFound) { @@ -5266,6 +5301,8 @@ TradeFunc_ResetGUI() { TradeAdvancedSelectedVeiledSuffix := TradeAdvancedVeiledSuffixCount := TradeAdvancedSelectedIncludeFractured := + TradeAdvancedSelectedFracturedCount := + TradeAdvancedFracturedCount := TradeGlobals.Set("AdvancedPriceCheckItem", {}) } @@ -5342,7 +5379,9 @@ TradeFunc_HandleGuiSubmit() { newItem.veiledPrefixCount := TradeAdvancedVeiledPrefixCount newItem.useVeiledSuffix := TradeAdvancedSelectedVeiledSuffix newItem.veiledSuffixCount := TradeAdvancedVeiledSuffixCount - newItem.inlcudeFractured := TradeAdvancedSelectedIncludeFractured + newItem.includeFractured := TradeAdvancedSelectedIncludeFractured + newItem.includeFracturedCount := TradeAdvancedSelectedFracturedCount + newItem.fracturedCount := TradeAdvancedFracturedCount TradeGlobals.Set("AdvancedPriceCheckItem", newItem) Gui, SelectModsGui:Destroy @@ -5645,7 +5684,7 @@ ReadPoeNinjaCurrencyData: fallBackDir := A_ScriptDir . "\data_trade" url := "https://poe.ninja/api/Data/GetCurrencyOverview?league=" . league parsedJSON := CurrencyDataDownloadURLtoJSON(url, sampleValue, false, isFallback, league, "PoE-TradeMacro", file, fallBackDir, usedFallback, loggedCurrencyRequestAtStartup, loggedTempLeagueCurrencyRequest, TradeOpts.CurlTimeout) - + ; fallback to Standard and Hardcore league if used league seems to not be available If (!parsedJSON.currencyDetails.length()) { isFallback := true diff --git a/resources/ahk/TradeMacroInit.ahk b/resources/ahk/TradeMacroInit.ahk index 28c80150..df83d0cf 100644 --- a/resources/ahk/TradeMacroInit.ahk +++ b/resources/ahk/TradeMacroInit.ahk @@ -141,6 +141,8 @@ ReadTradeConfig("", "config_trade.ini", _updateConfigWrite) TradeGlobals.Set("LeagueName", TradeGlobals.Get("Leagues")[TradeOpts.SearchLeague]) TradeFunc_CheckIfCloudFlareBypassNeeded() +; call it again (TradeFunc_CheckIfCloudFlareBypassNeeded reads poetrades available leagues but can't be called before the first TradeFunc_GetLeagues call at the moment (bad coding)) +TradeGlobals.Set("Leagues", TradeFunc_GetLeagues()) ; set this variable to skip the update check in "PoE-ItemInfo.ahk" SkipItemInfoUpdateCall := 1 @@ -391,7 +393,7 @@ TradeFunc_GetLeagues() { standard := "standard" For key, val in LeaguesData { - If (!val.event and not RegExMatch(val.id, "i)^SSF")) { + If (not val.event and not RegExMatch(val.id, "i)^SSF")) { If (val.id = standard) { leagues[standard] := val.id } @@ -405,9 +407,17 @@ TradeFunc_GetLeagues() { leagues["tmp" standard] := val.id } } + Else If (val.event and not RegExMatch(val.id, "i)^SSF")) { + If (InStr(val.id, " HC ")) { + leagues["event" hardcore] := val.id + } + Else { + leagues["event" standard] := val.id + } + } Else { For i, value in poeTradeLeagues { - If (value = val.id) { + If (value = val.id and not RegExMatch(value, "i)^PS4|^XBOX")) { trimmedValue := Format("{:L}", RegExReplace(value, "i)\s", "")) leagues[trimmedValue] := value } @@ -419,7 +429,7 @@ TradeFunc_GetLeagues() { ; make sure there are no duplicate temp leagues (hardcoded keys) For j, value in poeTradeLeagues { trimmedValue := Format("{:L}", RegExReplace(value, "i)\s", "")) - If (not leagues[trimmedValue]) { + If (not leagues[trimmedValue] and not RegExMatch(value, "i)^PS4|^XBOX")) { found := false For i, l in leagues { If (value = l) { @@ -431,7 +441,7 @@ TradeFunc_GetLeagues() { } } } - + Return leagues }