From 0b1340520eb98a0c51d6fe38881a2c370edd1883 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 08:23:22 -0700 Subject: [PATCH] explain item qualities better --- ArtifactMenu.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ArtifactMenu.lua b/ArtifactMenu.lua index 4be4b4c..b418bb5 100644 --- a/ArtifactMenu.lua +++ b/ArtifactMenu.lua @@ -11,14 +11,23 @@ local function openOffhandSockets() end function SlashCmdList.ARTIFACTMENU(msg, editBox) - local ARTIFACT = 6; -- http://wowprogramming.com/docs/api_types#itemQuality + -- http://wowprogramming.com/docs/api_types#itemQuality + local QUALITY = {} + QUALITY.POOR = 0; + QUALITY.COMMON = 1; + QUALITY.UNCOMMON = 2; + QUALITY.RARE = 3; + QUALITY.EPIC = 4; + QUALITY.LEGENDARY = 5; + QUALITY.ARTIFACT = 6; + QUALITY.HEIRLOOM = 7; local equippedWeapon = GetInventoryItemID("player", GetInventorySlotInfo("MainHandSlot")); if equippedWeapon == nil then print("You do not have any weapons equipped."); return end name, link, quality, iLvl, reqLvl, class, subclass, maxStack, equipSlot, texture, vendorSellPrice = GetItemInfo(equippedWeapon); - if quality == ARTIFACT then + if quality == QUALITY["ARTIFACT"] then openWeaponSockets(); else print("You do not have an Artifact Weapon equipped yet."); -- 1.7.9.5