Skip to content

Commit

Permalink
Release 1.4.136
Browse files Browse the repository at this point in the history
- Added console importing
- Updated mods and skills
  • Loading branch information
Openarl committed Apr 7, 2019
1 parent 1f4c3d5 commit 64b4302
Show file tree
Hide file tree
Showing 33 changed files with 6,665 additions and 6,454 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 1.4.136 - 2019/04/07
* You can now import characters from the console realms
* Updated item mods and skill gems to account for changes in recent patches
* Fixed issue preventing Icestorm's duration from scaling from Intelligence

### 1.4.135 - 2019/03/14
* Fixed crafted mods on imported items not being recognised
* Storm Call now correctly shows DPS instead of just average damage
Expand Down
30 changes: 23 additions & 7 deletions Classes/ImportTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
local ipairs = ipairs
local t_insert = table.insert

local realmList = {
{ label = "PC", id = "PC", realmCode = "pc", profileURL = "https://www.pathofexile.com/account/view-profile/" },
{ label = "Xbox", id = "XBOX", realmCode = "xbox", profileURL = "https://www.pathofexile.com/account/xbox/view-profile/" },
{ label = "PS4", id = "SONY", realmCode = "sony", profileURL = "https://www.pathofexile.com/account/sony/view-profile/" },
}

local ImportTabClass = newClass("ImportTab", "ControlHost", "Control", function(self, build)
self.ControlHost()
self.Control()
Expand Down Expand Up @@ -38,7 +44,9 @@ If possible, change the game version in the Configuration tab before importing.]
self.controls.accountNameHeader.shown = function()
return self.charImportMode == "GETACCOUNTNAME"
end
self.controls.accountName = new("EditControl", {"TOPLEFT",self.controls.accountNameHeader,"BOTTOMLEFT"}, 0, 4, 200, 20, main.lastAccountName or "", nil, "%c")
self.controls.accountRealm = new("DropDownControl", {"TOPLEFT",self.controls.accountNameHeader,"BOTTOMLEFT"}, 0, 4, 60, 20, realmList )
self.controls.accountRealm:SelByValue( main.lastRealm or "PC", "id" )
self.controls.accountName = new("EditControl", {"LEFT",self.controls.accountRealm,"RIGHT"}, 8, 0, 200, 20, main.lastAccountName or "", nil, "%c")
self.controls.accountName.pasteFilter = function(text)
return text:gsub("[\128-\255]",function(c)
return codePointToUTF8(c:byte(1)):gsub(".",function(c)
Expand All @@ -53,7 +61,7 @@ If possible, change the game version in the Configuration tab before importing.]
self.controls.accountNameGo.enabled = function()
return self.controls.accountName.buf:match("%S")
end
self.controls.accountNameUnicode = new("LabelControl", {"TOPLEFT",self.controls.accountName,"BOTTOMLEFT"}, 0, 16, 0, 14, "^7Note: if the account name contains non-ASCII characters then it must be URL encoded first.")
self.controls.accountNameUnicode = new("LabelControl", {"TOPLEFT",self.controls.accountRealm,"BOTTOMLEFT"}, 0, 16, 0, 14, "^7Note: if the account name contains non-ASCII characters then it must be URL encoded first.")
self.controls.accountNameURLEncoder = new("ButtonControl", {"TOPLEFT",self.controls.accountNameUnicode,"BOTTOMLEFT"}, 0, 4, 170, 18, "^x4040FFhttps://www.urlencoder.org/", function()
OpenURL("https://www.urlencoder.org/")
end)
Expand Down Expand Up @@ -243,6 +251,8 @@ You can get this from your web browser's cookies while logged into the Path of E
end)

function ImportTabClass:Load(xml, fileName)
self.lastRealm = xml.attrib.lastRealm
self.controls.accountRealm:SelByValue( self.lastRealm or main.lastRealm or "PC", "id" )
self.lastAccountHash = xml.attrib.lastAccountHash
if self.lastAccountHash then
for accountName in pairs(main.gameAccounts) do
Expand All @@ -256,6 +266,7 @@ end

function ImportTabClass:Save(xml)
xml.attrib = {
lastRealm = self.lastRealm,
lastAccountHash = self.lastAccountHash,
lastCharacterHash = self.lastCharacterHash,
}
Expand All @@ -278,8 +289,9 @@ function ImportTabClass:DownloadCharacterList()
self.charImportMode = "DOWNLOADCHARLIST"
self.charImportStatus = "Retrieving character list..."
local accountName = self.controls.accountName.buf
local realm = realmList[self.controls.accountRealm.selIndex]
local sessionID = #self.controls.sessionInput.buf == 32 and self.controls.sessionInput.buf or (main.gameAccounts[accountName] and main.gameAccounts[accountName].sessionID)
launch:DownloadPage("https://www.pathofexile.com/character-window/get-characters?accountName="..accountName, function(page, errMsg)
launch:DownloadPage("https://www.pathofexile.com/character-window/get-characters?accountName="..accountName.."&realm="..realm.realmCode, function(page, errMsg)
if errMsg == "Response code: 403" then
self.charImportStatus = colorCodes.NEGATIVE.."Account profile is private."
self.charImportMode = "GETSESSIONID"
Expand Down Expand Up @@ -307,13 +319,13 @@ function ImportTabClass:DownloadCharacterList()
end
-- GGG's character API has an issue where for /get-characters the account name is not case-sensitive, but for /get-passive-skills and /get-items it is.
-- This workaround grabs the profile page and extracts the correct account name from one of the URLs.
launch:DownloadPage("https://www.pathofexile.com/account/view-profile/"..accountName, function(page, errMsg)
launch:DownloadPage(realm.profileURL..accountName, function(page, errMsg)
if errMsg then
self.charImportStatus = colorCodes.NEGATIVE.."Error retrieving character list, try again ("..errMsg:gsub("\n"," ")..")"
self.charImportMode = "GETACCOUNTNAME"
return
end
local realAccountName = page:match("/account/view%-profile/([^/]+)/characters"):gsub(".", function(c) if c:byte(1) > 127 then return string.format("%%%2X",c:byte(1)) else return c end end)
local realAccountName = page:match("/view%-profile/([^/]+)/characters"):gsub(".", function(c) if c:byte(1) > 127 then return string.format("%%%2X",c:byte(1)) else return c end end)
if not realAccountName then
self.charImportStatus = colorCodes.NEGATIVE.."Failed to retrieve character list."
self.charImportMode = "GETSESSIONID"
Expand All @@ -323,6 +335,8 @@ function ImportTabClass:DownloadCharacterList()
accountName = realAccountName
self.charImportStatus = "Character list successfully retrieved."
self.charImportMode = "SELECTCHAR"
self.lastRealm = realm.id
main.lastRealm = realm.id
self.lastAccountHash = common.sha1(accountName)
main.lastAccountName = accountName
main.gameAccounts[accountName] = main.gameAccounts[accountName] or { }
Expand Down Expand Up @@ -377,11 +391,12 @@ end
function ImportTabClass:DownloadPassiveTree()
self.charImportMode = "IMPORTING"
self.charImportStatus = "Retrieving character passive tree..."
local realm = realmList[self.controls.accountRealm.selIndex]
local accountName = self.controls.accountName.buf
local sessionID = #self.controls.sessionInput.buf == 32 and self.controls.sessionInput.buf or (main.gameAccounts[accountName] and main.gameAccounts[accountName].sessionID)
local charSelect = self.controls.charSelect
local charData = charSelect.list[charSelect.selIndex].char
launch:DownloadPage("https://www.pathofexile.com/character-window/get-passive-skills?accountName="..accountName.."&character="..charData.name, function(page, errMsg)
launch:DownloadPage("https://www.pathofexile.com/character-window/get-passive-skills?accountName="..accountName.."&character="..charData.name.."&realm="..realm.realmCode, function(page, errMsg)
self.charImportMode = "SELECTCHAR"
if errMsg then
self.charImportStatus = colorCodes.NEGATIVE.."Error importing character data, try again ("..errMsg:gsub("\n"," ")..")"
Expand All @@ -398,11 +413,12 @@ end
function ImportTabClass:DownloadItems()
self.charImportMode = "IMPORTING"
self.charImportStatus = "Retrieving character items..."
local realm = realmList[self.controls.accountRealm.selIndex]
local accountName = self.controls.accountName.buf
local sessionID = #self.controls.sessionInput.buf == 32 and self.controls.sessionInput.buf or (main.gameAccounts[accountName] and main.gameAccounts[accountName].sessionID)
local charSelect = self.controls.charSelect
local charData = charSelect.list[charSelect.selIndex].char
launch:DownloadPage("https://www.pathofexile.com/character-window/get-items?accountName="..accountName.."&character="..charData.name, function(page, errMsg)
launch:DownloadPage("https://www.pathofexile.com/character-window/get-items?accountName="..accountName.."&character="..charData.name.."&realm="..realm.realmCode, function(page, errMsg)
self.charImportMode = "SELECTCHAR"
if errMsg then
self.charImportStatus = colorCodes.NEGATIVE.."Error importing character data, try again ("..errMsg:gsub("\n"," ")..")"
Expand Down
2 changes: 1 addition & 1 deletion Data/2_6/ModCache.lua

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Data/2_6/SkillStatMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ return {
skill("totemLevel", nil),
},
["spell_uncastable_if_triggerable"] = {
skill("triggered", true, { type = "SkillType", skillType = SkillType.TriggerableSpell }),
skill("triggered", true, { type = "SkillType", skillType = SkillType.Triggerable }),
},
["unique_mjolner_lightning_spells_triggered"] = {
skill("triggered", true, { type = "SkillType", skillType = SkillType.TriggerableSpell }),
skill("triggered", true, { type = "SkillType", skillType = SkillType.Triggerable }),
},
["unique_cospris_malice_cold_spells_triggered"] = {
skill("triggered", true, { type = "SkillType", skillType = SkillType.TriggerableSpell }),
skill("triggered", true, { type = "SkillType", skillType = SkillType.Triggerable }),
},
["skill_double_hits_when_dual_wielding"] = {
skill("doubleHitsWhenDualWielding", true),
Expand Down
24 changes: 9 additions & 15 deletions Data/3_0/Gems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2019,9 +2019,10 @@ return {
tags = {
strength = true,
support = true,
spell = true,
totem = true,
},
tagString = "Support, Totem",
tagString = "Support, Spell, Totem",
reqStr = 60,
reqDex = 0,
reqInt = 40,
Expand Down Expand Up @@ -2322,9 +2323,8 @@ return {
strength = true,
support = true,
totem = true,
attack = true,
},
tagString = "Bow, Projectile, Support, Totem, Attack",
tagString = "Bow, Projectile, Support, Totem",
reqStr = 60,
reqDex = 40,
reqInt = 0,
Expand Down Expand Up @@ -2662,9 +2662,8 @@ return {
dexterity = true,
support = true,
spell = true,
trigger = true,
},
tagString = "Support, Spell, Trigger",
tagString = "Support, Spell",
reqStr = 0,
reqDex = 60,
reqInt = 40,
Expand All @@ -2678,9 +2677,8 @@ return {
melee = true,
attack = true,
spell = true,
trigger = true,
},
tagString = "Support, Melee, Attack, Spell, Trigger",
tagString = "Support, Melee, Attack, Spell",
reqStr = 60,
reqDex = 0,
reqInt = 40,
Expand Down Expand Up @@ -2868,9 +2866,8 @@ return {
dexterity = true,
support = true,
spell = true,
trigger = true,
},
tagString = "Support, Spell, Trigger",
tagString = "Support, Spell",
reqStr = 0,
reqDex = 60,
reqInt = 40,
Expand All @@ -2882,9 +2879,8 @@ return {
strength = true,
support = true,
spell = true,
trigger = true,
},
tagString = "Support, Spell, Trigger",
tagString = "Support, Spell",
reqStr = 60,
reqDex = 0,
reqInt = 40,
Expand All @@ -2896,9 +2892,8 @@ return {
intelligence = true,
support = true,
spell = true,
trigger = true,
},
tagString = "Support, Spell, Trigger",
tagString = "Support, Spell",
reqStr = 0,
reqDex = 40,
reqInt = 60,
Expand Down Expand Up @@ -4336,9 +4331,8 @@ return {
support = true,
channelling = true,
spell = true,
trigger = true,
},
tagString = "Support, Channelling, Spell, Trigger",
tagString = "Support, Channelling, Spell",
reqStr = 0,
reqDex = 40,
reqInt = 60,
Expand Down
2 changes: 1 addition & 1 deletion Data/3_0/ModCache.lua

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Data/3_0/ModFlask.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ return {
["FlaskFullRechargeOnCrit1"] = { type = "Prefix", affix = "Surgeon's", "Recharges 1 Charge when you deal a Critical Strike", statOrderKey = "362", statOrder = { 362 }, level = 8, group = "FlaskRechargeRate", weightKey = { "critical_utility_flask", "default", }, weightVal = { 0, 0, }, },
["FlaskChanceRechargeOnCrit1"] = { type = "Prefix", affix = "Surgeon's", "20% chance to gain a Flask Charge when you deal a Critical Strike", statOrderKey = "363", statOrder = { 363 }, level = 8, group = "FlaskRechargeRate", weightKey = { "critical_utility_flask", "default", }, weightVal = { 0, 1000, }, },
["FlaskFullRechargeOnTakeCrit1"] = { type = "Prefix", affix = "Avenger's", "Recharges 3 Charges when you take a Critical Strike", statOrderKey = "364", statOrder = { 364 }, level = 12, group = "FlaskRechargeRate", weightKey = { "default", }, weightVal = { 1000, }, },
["FlaskDispellsPoison1"] = { type = "Suffix", affix = "of Curing", "Immune to Poison during Flask Effect", "Removes Poison on use", statOrderKey = "2560,2560.1", statOrder = { 2560, 2560.1 }, level = 16, group = "FlaskDispellPoison", weightKey = { "default", }, weightVal = { 1000, }, },
["FlaskEffectReducedDuration1"] = { type = "Prefix", affix = "Alchemist's", "25% increased effect", "33% reduced Duration", statOrderKey = "2559,2574", statOrder = { 2559, 2574 }, level = 20, group = "FlaskRecoverySpeed", weightKey = { "no_effect_flask_mod", "utility_flask", "default", }, weightVal = { 0, 1000, 0, }, },
["FlaskDispellsPoison1"] = { type = "Suffix", affix = "of Curing", "Immune to Poison during Flask Effect", "Removes Poison on use", statOrderKey = "2565,2565.1", statOrder = { 2565, 2565.1 }, level = 16, group = "FlaskDispellPoison", weightKey = { "default", }, weightVal = { 1000, }, },
["FlaskEffectReducedDuration1"] = { type = "Prefix", affix = "Alchemist's", "25% increased effect", "33% reduced Duration", statOrderKey = "2564,2579", statOrder = { 2564, 2579 }, level = 20, group = "FlaskRecoverySpeed", weightKey = { "no_effect_flask_mod", "utility_flask", "default", }, weightVal = { 0, 1000, 0, }, },
["FlaskChargesUsed1"] = { type = "Prefix", affix = "Chemist's", "(20-25)% reduced Charges used", statOrderKey = "360", statOrder = { 360 }, level = 14, group = "FlaskChargesUsed", weightKey = { "default", }, weightVal = { 1000, }, },
["FlaskIncreasedDuration2"] = { type = "Prefix", affix = "Experimenter's", "(30-40)% increased Duration", statOrderKey = "2574", statOrder = { 2574 }, level = 20, group = "FlaskRecoverySpeed", weightKey = { "utility_flask", "critical_utility_flask", "default", }, weightVal = { 1000, 1000, 0, }, },
["FlaskIncreasedDuration2"] = { type = "Prefix", affix = "Experimenter's", "(30-40)% increased Duration", statOrderKey = "2579", statOrder = { 2579 }, level = 20, group = "FlaskRecoverySpeed", weightKey = { "utility_flask", "critical_utility_flask", "default", }, weightVal = { 1000, 1000, 0, }, },
["FlaskCurseImmunity1"] = { type = "Suffix", affix = "of Warding", "Immune to Curses during Flask effect", "Removes Curses on use", statOrderKey = "397,397.1", statOrder = { 397, 397.1 }, level = 18, group = "FlaskCurseImmunity", weightKey = { "default", }, weightVal = { 500, }, },
}
Loading

0 comments on commit 64b4302

Please sign in to comment.