@@ -1023,12 +1023,39 @@ function ImportTabClass:ImportItemsAndSkills(charData)
10231023 return charData -- For the wrapper
10241024end
10251025
1026+ function ImportTabClass :ImportChakra (slotName , runeName )
1027+ local slot = self .build .itemsTab .runeSlots [slotName ]
1028+ -- note that if the rune is not in ModRunes.lua, this will not select it
1029+ if slot then
1030+ slot :SelByValue (runeName , " name" )
1031+ end
1032+ end
1033+
1034+ function ImportTabClass :ImportChakra (slotName , runeName )
1035+ local slot = self .build .itemsTab .runeSlots [slotName ]
1036+ -- note that if the rune is not in ModRunes.lua, this will not select it
1037+ if slot then
1038+ slot :SelByValue (runeName , " name" )
1039+ end
1040+ end
1041+
10261042local rarityMap = { [0 ] = " NORMAL" , " MAGIC" , " RARE" , " UNIQUE" , [9 ] = " RELIC" , [10 ] = " RELIC" , [13 ] = " RARE" }
10271043local slotMap = { [" Weapon" ] = " Weapon 1" , [" Offhand" ] = " Weapon 2" , [" Weapon2" ] = " Weapon 1 Swap" , [" Offhand2" ] = " Weapon 2 Swap" , [" Helm" ] = " Helmet" , [" BodyArmour" ] = " Body Armour" , [" Gloves" ] = " Gloves" , [" Boots" ] = " Boots" , [" Amulet" ] = " Amulet" , [" Ring" ] = " Ring 1" , [" Ring2" ] = " Ring 2" , [" Ring3" ] = " Ring 3" , [" Belt" ] = " Belt" , [" IncursionArmLeft" ] = " Arm 2" , [" IncursionArmRight" ] = " Arm 1" , [" IncursionLegLeft" ] = " Leg 2" , [" IncursionLegRight" ] = " Leg 1" }
10281044
10291045function ImportTabClass :ImportItem (itemData , slotName )
10301046 if not slotName then
1031- if itemData .inventoryId == " PassiveJewels" then
1047+ -- monk martial artist rune tattoos
1048+ if itemData .inventoryId == " Chakra" then
1049+ -- TODO: should probably be exported from chakraslots.dat64
1050+ -- API doesn't have slots directly, but has an x position similar to flasks
1051+ slotMap = {" Helmet Rune #1" , " Body Armour Rune #1" , " Body Armour Rune #2" , " Gloves Rune #1" , " Boots Rune #1" }
1052+ if slotMap [itemData .x + 1 ] and itemData .baseType then
1053+ slotName = slotMap [itemData .x + 1 ]
1054+ -- runes are imported differently as they're not items located in your inventory
1055+ self :ImportChakra (slotName , itemData .baseType )
1056+ return
1057+ end
1058+ elseif itemData .inventoryId == " PassiveJewels" then
10321059 slotName = " Jewel " .. self .build .latestTree .jewelSlots [itemData .x + 1 ]
10331060 elseif itemData .inventoryId == " Flask" then
10341061 if itemData .x > 1 then
0 commit comments