From 0d0edd5a1f44ca7ba8d7df95b23031bef20e8023 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 08:14:46 -0700 Subject: [PATCH] structure behavior around item quality --- ArtifactMenu.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ArtifactMenu.lua b/ArtifactMenu.lua index 2122b09..036959a 100644 --- a/ArtifactMenu.lua +++ b/ArtifactMenu.lua @@ -10,7 +10,17 @@ local function openOffhandSockets() end function SlashCmdList.ARTIFACTMENU(msg, editBox) - openWeaponSockets(); - print("Opening ArtifactMenu..."); + local ARTIFACT = 6; -- http://wowprogramming.com/docs/api_types#itemQuality + 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 + openWeaponSockets(); + else + print("You do not have an Artifact Weapon equipped yet."); + end end -- 1.7.9.5