Skip to content

Commit d737e7a

Browse files
committed
Update modules, modparser and exporters.
1 parent 8f8cbae commit d737e7a

25 files changed

+466
-496
lines changed

src/Classes/ImportTab.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ function ImportTabClass:ImportItem(itemData, slotName)
816816
if item.name:match("Energy Blade") then
817817
local oneHanded = false
818818
for _, p in ipairs(itemData.properties) do
819-
if self.build.data.weaponTypeInfo[p.name] and self.build.data.weaponTypeInfo[p.name].oneHand then
819+
if self.build.data.weaponClassInfo[p.name] and self.build.data.weaponClassInfo[p.name].oneHand then
820820
oneHanded = true
821821
break
822822
end

src/Classes/Item.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,7 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum)
13071307
if self.base.weapon then
13081308
local weaponData = { }
13091309
self.weaponData[slotNum] = weaponData
1310+
weaponData.class = self.base.class
13101311
weaponData.category = self.base.category
13111312
weaponData.name = self.name
13121313
weaponData.AttackSpeedInc = calcLocal(modList, "Speed", "INC", ModFlag.Attack) + m_floor(self.quality / 8 * calcLocal(modList, "AlternateQualityLocalAttackSpeedPer8Quality", "INC", 0))

src/Classes/ItemDBControl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function ItemDBClass:DoesItemMatchFilters(item)
9696
return false
9797
end
9898
elseif categorySel == 4 or categorySel == 5 then
99-
local weaponInfo = self.itemsTab.build.data.weaponTypeInfo[item.category]
99+
local weaponInfo = self.itemsTab.build.data.weaponClassInfo[item.class]
100100
if not (weaponInfo and weaponInfo.melee and ((categorySel == 4 and weaponInfo.oneHand) or (categorySel == 5 and not weaponInfo.oneHand))) then
101101
return false
102102
end

src/Classes/ItemsTab.lua

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,21 +1914,21 @@ function ItemsTabClass:CraftItem()
19141914
item:BuildAndParseRaw()
19151915
return item
19161916
end
1917-
controls.rarityLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {50, 20, 0, 16}, "Rarity:")
1918-
controls.rarity = new("DropDownControl", nil, {-80, 20, 100, 18}, rarityDropList)
1917+
controls.rarityLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {70, 20, 0, 16}, "Rarity:")
1918+
controls.rarity = new("DropDownControl", {"TOPLEFT",controls.rarityLabel,"TOPRIGHT"}, {5, 0, 100, 18}, rarityDropList)
19191919
controls.rarity.selIndex = self.lastCraftRaritySel or 3
1920-
controls.title = new("EditControl", nil, {70, 20, 190, 18}, "", "Name")
1920+
controls.title = new("EditControl", {"TOPLEFT",controls.rarity,"TOPRIGHT"}, {5, 0, 190, 18}, "", "Name")
19211921
controls.title.shown = function()
19221922
return controls.rarity.selIndex >= 3
19231923
end
1924-
controls.categoryLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {50, 45, 0, 16}, "Category:")
1925-
controls.category = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, {55, 45, 295, 18}, self.build.data.itemBaseCategoryList, function(index, value)
1924+
controls.categoryLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {70, 45, 0, 16}, "^7Category:")
1925+
controls.category = new("DropDownControl", {"TOPLEFT",controls.categoryLabel,"TOPRIGHT"}, {5, 0, 295, 18}, self.build.data.itemBaseCategoryList, function(index, value)
19261926
controls.base.list = self.build.data.itemBaseLists[self.build.data.itemBaseCategoryList[index]]
19271927
controls.base.selIndex = 1
19281928
end)
1929-
controls.type.selIndex = self.lastCraftTypeSel or 1
1930-
controls.baseLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {50, 70, 0, 16}, "Base:")
1931-
controls.base = new("DropDownControl", {"TOPLEFT",nil,"TOPLEFT"}, {55, 70, 200, 18}, self.build.data.itemBaseLists[self.build.data.itemBaseCategoryList[controls.type.selIndex]])
1929+
controls.category.selIndex = self.lastCraftTypeSel or 1
1930+
controls.baseLabel = new("LabelControl", {"TOPRIGHT",nil,"TOPLEFT"}, {70, 70, 0, 16}, "Base:")
1931+
controls.base = new("DropDownControl", {"TOPLEFT",controls.baseLabel,"TOPRIGHT"}, {5, 0, 200, 18}, self.build.data.itemBaseLists[self.build.data.itemBaseCategoryList[controls.category.selIndex]])
19321932
controls.base.selIndex = self.lastCraftBaseSel or 1
19331933
controls.base.tooltipFunc = function(tooltip, mode, index, value)
19341934
tooltip:Clear()
@@ -1944,13 +1944,13 @@ function ItemsTabClass:CraftItem()
19441944
self:EditDisplayItemText()
19451945
end
19461946
self.lastCraftRaritySel = controls.rarity.selIndex
1947-
self.lastCraftTypeSel = controls.type.selIndex
1947+
self.lastCraftTypeSel = controls.category.selIndex
19481948
self.lastCraftBaseSel = controls.base.selIndex
19491949
end)
19501950
controls.cancel = new("ButtonControl", nil, {45, 100, 80, 20}, "Cancel", function()
19511951
main:ClosePopup()
19521952
end)
1953-
main:OpenPopup(370, 130, "Craft Item", controls)
1953+
main:OpenPopup(460, 130, "Craft Item", controls)
19541954
end
19551955

19561956
-- Opens the item text editor popup

src/Classes/SkillListControl.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ function SkillListClass:GetRowIcon(column, index, socketGroup)
211211
local slot = socketGroup.slot
212212
local itemsTab = self.skillsTab.build.itemsTab
213213
local weapon1Sel = itemsTab.activeItemSet["Weapon 1"].selItemId or 0
214-
local weapon1Class = itemsTab.items[weapon1Sel] and itemsTab.items[weapon1Sel].base.class or "None"
214+
local weapon1Class = itemsTab.items[weapon1Sel] and itemsTab.items[weapon1Sel].base.class or "Unarmed"
215215
local weapon1SwapSel = itemsTab.activeItemSet["Weapon 1 Swap"].selItemId or 0
216-
local weapon1SwapType = itemsTab.items[weapon1SwapSel] and itemsTab.items[weapon1SwapSel].base.class or "None"
216+
local weapon1SwapType = itemsTab.items[weapon1SwapSel] and itemsTab.items[weapon1SwapSel].base.class or "Unarmed"
217217
local weapon2Sel = itemsTab.activeItemSet["Weapon 2"].selItemId or 0
218-
local weapon2Class = itemsTab.items[weapon2Sel] and itemsTab.items[weapon2Sel].base.class or "None"
218+
local weapon2Class = itemsTab.items[weapon2Sel] and itemsTab.items[weapon2Sel].base.class or "Unarmed"
219219
local weapon2SwapSel = itemsTab.activeItemSet["Weapon 2 Swap"].selItemId or 0
220-
local weapon2SwapType = itemsTab.items[weapon2SwapSel] and itemsTab.items[weapon2SwapSel].base.class or "None"
220+
local weapon2SwapType = itemsTab.items[weapon2SwapSel] and itemsTab.items[weapon2SwapSel].base.class or "Unarmed"
221221
if slot == "Weapon 1" and weapon1Class == "Bow" then
222222
slot = weapon1Class
223223
end

src/Data/Global.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,15 @@ ModFlag.Fishing = 0x0000000002000000
236236
ModFlag.Crossbow = 0x0000000004000000
237237
ModFlag.Flail = 0x0000000008000000
238238
ModFlag.Spear = 0x0000000010000000
239+
ModFlag.Warstaff = 0x0000000020000000
240+
ModFlag.Sceptre = 0x0000000040000000
241+
239242
-- Weapon classes
240243
ModFlag.WeaponMelee =0x0000000100000000
241244
ModFlag.WeaponRanged=0x0000000200000000
242245
ModFlag.Weapon1H = 0x0000000400000000
243246
ModFlag.Weapon2H = 0x0000000800000000
244-
ModFlag.WeaponMask = 0x0000000F1FFF0000
247+
ModFlag.WeaponMask = 0x0000000F4FFF0000
245248

246249
KeywordFlag = { }
247250
-- Skill keywords

src/Data/Minions.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ minions["RaisedZombie"] = {
2020
attackTime = 1.25,
2121
attackRange = 9,
2222
accuracy = 1,
23-
weaponType1 = "One Handed Axe",
23+
weaponType1 = "One Hand Axe",
2424
limit = "ActiveZombieLimit",
2525
skillList = {
2626
"MinionMeleeStep",
@@ -93,7 +93,7 @@ minions["RaisedSkeletonWarrior"] = {
9393
attackTime = 1,
9494
attackRange = 12,
9595
accuracy = 1,
96-
weaponType1 = "One Handed Sword",
96+
weaponType1 = "One Hand Sword",
9797
weaponType2 = "Shield",
9898
limit = "ActiveSkeletonLimit",
9999
skillList = {
@@ -121,7 +121,7 @@ minions["RaisedSkeletonBrute"] = {
121121
attackTime = 1.75,
122122
attackRange = 16,
123123
accuracy = 1,
124-
weaponType1 = "Two Handed Mace",
124+
weaponType1 = "Two Hand Mace",
125125
limit = "ActiveSkeletonLimit",
126126
skillList = {
127127
"MinionMeleeStep",
@@ -173,7 +173,7 @@ minions["RaisedSkeletonFrostMage"] = {
173173
attackTime = 1,
174174
attackRange = 80,
175175
accuracy = 1,
176-
weaponType1 = "None",
176+
weaponType1 = "Unarmed",
177177
limit = "ActiveSkeletonLimit",
178178
skillList = {
179179
"FrostBoltSkeletonMageMinion",
@@ -199,7 +199,7 @@ minions["RaisedSkeletonCleric"] = {
199199
attackTime = 1,
200200
attackRange = 80,
201201
accuracy = 1,
202-
weaponType1 = "One Handed Mace",
202+
weaponType1 = "Sceptre",
203203
limit = "ActiveSkeletonLimit",
204204
skillList = {
205205
"HealSkeletonClericMinion",
@@ -225,7 +225,7 @@ minions["RaisedSkeletonArsonist"] = {
225225
attackTime = 1,
226226
attackRange = 80,
227227
accuracy = 1,
228-
weaponType1 = "None",
228+
weaponType1 = "Unarmed",
229229
limit = "ActiveSkeletonLimit",
230230
skillList = {
231231
"FireBombSkeletonMinion",
@@ -251,8 +251,8 @@ minions["RaisedSkeletonReaver"] = {
251251
attackTime = 0.83,
252252
attackRange = 14,
253253
accuracy = 1,
254-
weaponType1 = "One Handed Axe",
255-
weaponType2 = "One Handed Axe",
254+
weaponType1 = "One Hand Axe",
255+
weaponType2 = "One Hand Axe",
256256
limit = "ActiveSkeletonLimit",
257257
skillList = {
258258
"MinionMeleeStep",

0 commit comments

Comments
 (0)