Skip to content

Commit 950a16d

Browse files
committed
Fix Mace Strike import and "Two Hand" naming on items
1 parent 510802a commit 950a16d

26 files changed

Lines changed: 467 additions & 441 deletions

src/Classes/ImportTab.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,30 @@ function ImportTabClass:ImportItemsAndSkills(charData)
772772
gemId = "Metadata/Items/Gems/SkillGemSummonBeast"
773773
end
774774

775+
-- This could be done better with the character melee skills data at some point.
776+
if typeLine:match("Mace Strike") then
777+
local weapon1Sel = self.build.itemsTab.activeItemSet["Weapon 1"].selItemId or 0
778+
local weapon2Sel = self.build.itemsTab.activeItemSet["Weapon 2"].selItemId or 0
779+
if weapon2Sel == 0 then
780+
if self.build.itemsTab.items[weapon1Sel].base.type == "One Hand Mace" then
781+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefault1HMace"
782+
elseif self.build.itemsTab.items[weapon1Sel].base.type == "Two Hand Mace" then
783+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefault2HMace"
784+
end
785+
else
786+
if self.build.itemsTab.items[weapon2Sel].base.type == "One Hand Mace" or self.build.itemsTab.items[weapon2Sel].base.type == "Two Hand Mace" then
787+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefaultMaceMace" -- Dual wielding maces
788+
elseif self.build.itemsTab.items[weapon1Sel].base.type == "One Hand Mace" then
789+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefault1HMace"
790+
elseif self.build.itemsTab.items[weapon1Sel].base.type == "Two Hand Mace" then
791+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefault2HMace"
792+
end
793+
end
794+
end
795+
if typeLine:match("Spear Stab") and (self.build.itemsTab.activeItemSet["Weapon 2"].selItemId or 0) ~= 0 then
796+
gemId = "Metadata/Items/Gems/SkillGemPlayerDefaultSpearOffHand"
797+
end
798+
775799
if gemId then
776800
local gemInstance = { level = 20, quality = 0, enabled = true, enableGlobal1 = true, enableGlobal2 = true, count = 1, gemId = gemId }
777801
gemInstance.support = skillData.support

src/Classes/TradeQueryGenerator.lua

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ local tradeCategoryNames = {
2222
["Quiver"] = { "Quiver" },
2323
["Shield"] = { "Shield", "Shield: Armour", "Shield: Armour/Energy Shield", "Shield: Armour/Evasion", "Shield: Evasion" },
2424
["Focus"] = { "Focus" },
25-
["1HWeapon"] = { "One Handed Mace", "Wand", "Sceptre", "Flail", "Spear" },
26-
["2HWeapon"] = { "Staff", "Staff: Warstaff", "Two Handed Mace", "Crossbow", "Bow", "Talisman" },
27-
-- ["1HAxe"] = { "One Handed Axe" },
28-
-- ["1HSword"] = { "One Handed Sword", "Thrusting One Handed Sword" },
29-
["1HMace"] = { "One Handed Mace" },
25+
["1HWeapon"] = { "One Hand Mace", "Wand", "Sceptre", "Flail", "Spear" },
26+
["2HWeapon"] = { "Staff", "Staff: Warstaff", "Two Hand Mace", "Crossbow", "Bow", "Talisman" },
27+
-- ["1HAxe"] = { "One Hand Axe" },
28+
-- ["1HSword"] = { "One Hand Sword", "Thrusting One Hand Sword" },
29+
["1HMace"] = { "One Hand Mace" },
3030
["Sceptre"] = { "Sceptre" },
3131
-- ["Dagger"] = { "Dagger" },
3232
["Wand"] = { "Wand" },
@@ -36,9 +36,9 @@ local tradeCategoryNames = {
3636
["Quarterstaff"] = { "Staff: Warstaff" },
3737
["Bow"] = { "Bow" },
3838
["Crossbow"] = { "Crossbow"},
39-
-- ["2HAxe"] = { "Two Handed Axe" },
40-
-- ["2HSword"] = { "Two Handed Sword" },
41-
["2HMace"] = { "Two Handed Mace" },
39+
-- ["2HAxe"] = { "Two Hand Axe" },
40+
-- ["2HSword"] = { "Two Hand Sword" },
41+
["2HMace"] = { "Two Hand Mace" },
4242
-- ["FishingRod"] = { "Fishing Rod" },
4343
["BaseJewel"] = { "Jewel" },
4444
["RadiusJewel"] = { "Jewel: Radius" },
@@ -642,19 +642,19 @@ function TradeQueryGeneratorClass:StartQuery(slot, options)
642642
elseif existingItem.type == "Staff" then
643643
itemCategoryQueryStr = "weapon.staff"
644644
itemCategory = "Staff"
645-
elseif existingItem.type == "Two Handed Sword" then
645+
elseif existingItem.type == "Two Hand Sword" then
646646
itemCategoryQueryStr = "weapon.twosword"
647647
itemCategory = "2HSword"
648-
elseif existingItem.type == "Two Handed Axe" then
648+
elseif existingItem.type == "Two Hand Axe" then
649649
itemCategoryQueryStr = "weapon.twoaxe"
650650
itemCategory = "2HAxe"
651-
elseif existingItem.type == "Two Handed Mace" then
651+
elseif existingItem.type == "Two Hand Mace" then
652652
itemCategoryQueryStr = "weapon.twomace"
653653
itemCategory = "2HMace"
654654
elseif existingItem.type == "Fishing Rod" then
655655
itemCategoryQueryStr = "weapon.rod"
656656
itemCategory = "FishingRod"
657-
elseif existingItem.type == "One Handed Sword" then
657+
elseif existingItem.type == "One Hand Sword" then
658658
itemCategoryQueryStr = "weapon.onesword"
659659
itemCategory = "1HSword"
660660
elseif existingItem.type == "Spear" then
@@ -663,10 +663,10 @@ function TradeQueryGeneratorClass:StartQuery(slot, options)
663663
elseif existingItem.type == "Flail" then
664664
itemCategoryQueryStr = "weapon.flail"
665665
itemCategory = "weapon.flail"
666-
elseif existingItem.type == "One Handed Axe" then
666+
elseif existingItem.type == "One Hand Axe" then
667667
itemCategoryQueryStr = "weapon.oneaxe"
668668
itemCategory = "1HAxe"
669-
elseif existingItem.type == "One Handed Mace" then
669+
elseif existingItem.type == "One Hand Mace" then
670670
itemCategoryQueryStr = "weapon.onemace"
671671
itemCategory = "1HMace"
672672
elseif existingItem.type == "Sceptre" then
@@ -681,10 +681,10 @@ function TradeQueryGeneratorClass:StartQuery(slot, options)
681681
elseif existingItem.type == "Claw" then
682682
itemCategoryQueryStr = "weapon.claw"
683683
itemCategory = "Claw"
684-
elseif existingItem.type:find("Two Handed") ~= nil then
684+
elseif existingItem.type:find("Two Hand") ~= nil then
685685
itemCategoryQueryStr = "weapon.twomelee"
686686
itemCategory = "2HWeapon"
687-
elseif existingItem.type:find("One Handed") ~= nil then
687+
elseif existingItem.type:find("One Hand") ~= nil then
688688
itemCategoryQueryStr = "weapon.one"
689689
itemCategory = "1HWeapon"
690690
else

0 commit comments

Comments
 (0)