Skip to content

Commit

Permalink
Rewrote AdditionalMacros; replaced WinHttp with HttpRequest lib, gzip…
Browse files Browse the repository at this point in the history
… support; bug fixes (#383)

* rewrote payload  generation

* rewrote more payload generation

* removed some commented code

* fixed mod group payload

* really fixed it

* fixed innate defense/offense max value being ignored (advanced search)

* fixed payload generation for leaguestones

* fixed missing ele dmg on some uniques and min/max dps calculations

* made min/max dps calculations more accurate

* added item bases data

* fixed some issues with negative mods and charges (mostly leaguestones)

* changed search tooltips

* added userfolder for custom macros, fixed WinHttp POST call using the library

* replaced search requests and release download with HttpRequest lib

* replaced cloudflare bypass test request code; removed obsolete code

* updated fallback exe/notes/version

* changed notes
  • Loading branch information
Eruyome authored Jul 17, 2017
1 parent 42b300a commit a37197e
Show file tree
Hide file tree
Showing 16 changed files with 1,534 additions and 337 deletions.
Binary file modified Fallback.exe
Binary file not shown.
29 changes: 25 additions & 4 deletions Run_ItemInfo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-ItemInfo")) {
/*
Set ProjectName to create user settings folder in A_MyDocuments
*/
projectName := "PoE-ItemInfo"
projectName := "PoE-ItemInfo"
FilesToCopyToUserFolder := ["\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt", "\resources\ahk\default_MapModWarnings.txt"]
overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, "", FilesToCopyToUserFolder, A_ScriptDir)
isDevelopmentVersion := PoEScripts_isDevelopmentVersion()
Expand All @@ -34,14 +34,14 @@ PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, A_ScriptDir, project
FileRead, info , %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk
FileRead, addMacros , %userDirectory%\AdditionalMacros.txt

info := info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r"
info := info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros
addMacros .= AppendCustomMacros(userDirectory)

CloseScript("ItemInfoMain.ahk")
FileDelete, %A_ScriptDir%\_ItemInfoMain.ahk
FileCopy, %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk, %A_ScriptDir%\_ItemInfoMain.ahk

FileAppend, %test% , %A_ScriptDir%\_ItemInfoMain.ahk
FileAppend, %addMacros% , %A_ScriptDir%\_ItemInfoMain.ahk

; set script hidden
Expand Down Expand Up @@ -84,4 +84,25 @@ RunAsAdmin()
DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
ExitApp
}
}

AppendCustomMacros(userDirectory)
{
If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) {
FileCreateDir, %userDirectory%\CustomMacros\
}

appendedMacros := "`n`n"
extensions := "txt,ahk"
Loop %userDirectory%\CustomMacros\*
{
If A_LoopFileExt in %extensions%
{
FileRead, tmp, %A_LoopFileFullPath%
appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------"
appendedMacros .= "`n" tmp "`n`n"
}
}

Return appendedMacros
}
26 changes: 24 additions & 2 deletions Run_TradeMacro.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ FileRead, tradeInit , %A_ScriptDir%\resources\ahk\TradeMacroInit.ahk
FileRead, trade , %A_ScriptDir%\resources\ahk\TradeMacro.ahk
FileRead, addMacros , %userDirectory%\AdditionalMacros.txt

info := "`n`r`n`r" . info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r`n`r"
info := "`n`r`n`r" . info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r`n`r"
addMacros .= AppendCustomMacros(userDirectory)

CloseScript("_TradeMacroMain.ahk")
CloseScript("_ItemInfoMain.ahk")
Expand Down Expand Up @@ -98,4 +99,25 @@ RunAsAdmin()

StartSplashScreen() {
SplashTextOn, , 20, PoE-TradeMacro, Merging and starting Scripts...
}

AppendCustomMacros(userDirectory)
{
If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) {
FileCreateDir, %userDirectory%\CustomMacros\
}

appendedMacros := "`n`n"
extensions := "txt,ahk"
Loop %userDirectory%\CustomMacros\*
{
If A_LoopFileExt in %extensions%
{
FileRead, tmp, %A_LoopFileFullPath%
appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------"
appendedMacros .= "`n" tmp "`n`n"
}
}

Return appendedMacros
}
1 change: 1 addition & 0 deletions data_trade/item_bases_armour.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data_trade/item_bases_weapon.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data_trade/mods.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data_trade/uniques.json

Large diffs are not rendered by default.

Loading

0 comments on commit a37197e

Please sign in to comment.