From d022ce05f71654f9efa4f48e15d1a2c5ebad2bed Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Thu, 25 Aug 2016 15:00:17 -0700 Subject: [PATCH 1/7] add full addon name as slash command --- ArtifactMenu.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArtifactMenu.lua b/ArtifactMenu.lua index 057f819..e4ad3b6 100644 --- a/ArtifactMenu.lua +++ b/ArtifactMenu.lua @@ -1,4 +1,5 @@ -LASH_ARTIFACTMENU1, SLASH_ARTIFACTMENU2 = '/artifact', '/am'; +SLASH_ARTIFACTMENU1, SLASH_ARTIFACTMENU2 = '/artifact', '/am'; +SLASH_ARTIFACTMENU3 = "/artifactmenu"; local function openWeaponSockets() SocketInventoryItem(16); -- 1.7.9.5 From a1869fe860d097c815798f9a75addb4fb5ebe11e Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Thu, 25 Aug 2016 15:03:11 -0700 Subject: [PATCH 2/7] define off-hands inventory slot #17 --- ArtifactMenu.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArtifactMenu.lua b/ArtifactMenu.lua index e4ad3b6..2122b09 100644 --- a/ArtifactMenu.lua +++ b/ArtifactMenu.lua @@ -5,6 +5,10 @@ local function openWeaponSockets() SocketInventoryItem(16); end +local function openOffhandSockets() + SocketInventoryItem(17); +end + function SlashCmdList.ARTIFACTMENU(msg, editBox) openWeaponSockets(); print("Opening ArtifactMenu..."); -- 1.7.9.5 From 0d0edd5a1f44ca7ba8d7df95b23031bef20e8023 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 08:14:46 -0700 Subject: [PATCH 3/7] 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 From 11f18f9e0590838e11ba660ae55e4ddee273b896 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 08:15:48 -0700 Subject: [PATCH 4/7] note that off-hands are irrelevant --- ArtifactMenu.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/ArtifactMenu.lua b/ArtifactMenu.lua index 036959a..4be4b4c 100644 --- a/ArtifactMenu.lua +++ b/ArtifactMenu.lua @@ -5,6 +5,7 @@ local function openWeaponSockets() SocketInventoryItem(16); end +-- unneeded, because artifacts are "conjoined" items local function openOffhandSockets() SocketInventoryItem(17); end -- 1.7.9.5 From 0b1340520eb98a0c51d6fe38881a2c370edd1883 Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 08:23:22 -0700 Subject: [PATCH 5/7] 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 From 569107e4cf86ef7afb412a4e2f481c5fddd7050c Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 09:54:52 -0700 Subject: [PATCH 6/7] credit specific individuals in Special Thanks --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index afa957c..1acf1ca 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,5 @@ This add-on will simplify all of that to just: * [The idea](https://www.reddit.com/r/wow/comments/4ze7uw/psa_macro_to_quickly_open_the_artifact_weapon/) by [/u/HoLeeSchit](https://www.reddit.com/user/HoLeeSchit) * [WoW Addon Writing Guide](http://wow.gamepedia.com/User:Cogswobble/Addon_Tutorial/Slash_Commands) by Cogswobble * Wowpedia [slash commands reference](http://wow.gamepedia.com/Creating_a_slash_command) -* The nice people of [#wowuidev](http://us.battle.net/forums/en/wow/topic/1127130079) for helping me debug - +* The nice people of [#wowuidev](http://us.battle.net/forums/en/wow/topic/1127130079) for helping me debug, specifically `kd3`, `Nebula`, and `Semlar` +* [Farrar-Gilneas](http://us.battle.net/wow/en/character/gilneas/Farrar/simple) for testing this add-on in the *Legion* beta. -- 1.7.9.5 From be496d82be70d9a885589dc5d19fd97c0c552a3d Mon Sep 17 00:00:00 2001 From: Kevin Gilbert Date: Fri, 26 Aug 2016 10:19:02 -0700 Subject: [PATCH 7/7] bump version for first release --- ArtifactMenu.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArtifactMenu.toc b/ArtifactMenu.toc index 087f939..4591fd5 100644 --- a/ArtifactMenu.toc +++ b/ArtifactMenu.toc @@ -1,6 +1,6 @@ ## Interface: 70000 ## Title: ArtifactMenu ## Author: Kevin Gilbert (kaygil) -## Version: 0.2.0 +## Version: 1.0.0 ArtifactMenu.lua -- 1.7.9.5