From 5d011c41e70b1fc647b7fc8fcef5f92d21094a19 Mon Sep 17 00:00:00 2001 From: dvipid Date: Tue, 25 Dec 2018 10:08:42 -0500 Subject: [PATCH] Fixes PickupSpell for PVP talent "Gladiator's Medallion" (WM on only). --- ButtonForge/Const.lua | 1 + ButtonForge/Util.lua | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ButtonForge/Const.lua b/ButtonForge/Const.lua index 97484a8..78a2587 100644 --- a/ButtonForge/Const.lua +++ b/ButtonForge/Const.lua @@ -11,6 +11,7 @@ Const.SUMMON_RANDOM_FAVORITE_MOUNT_SPELL = 150544; Const.SUMMON_RANDOM_FAVORITE_MOUNT_ID = 268435455; Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID = "BattlePet-0-FFFFFFFFFFFFFF"; Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE = "Interface/Icons/INV_Pet_Achievement_CaptureAPetFromEachFamily_Battle"; +Const.PVP_SPELL_GLADIATORS_MEDALLION = 208683; Const.Version = 0.9; Const.VersionMinor = 50; Const.MAX_ACCOUNT_MACROS = 120; diff --git a/ButtonForge/Util.lua b/ButtonForge/Util.lua index 108acf8..c81f0f8 100644 --- a/ButtonForge/Util.lua +++ b/ButtonForge/Util.lua @@ -1537,8 +1537,11 @@ function Util.SetCursor(Command, Data, Subvalue, Subsubvalue) SpellFlyout:Hide(); if (Command == "spell") then local SpellName = GetSpellInfo(Subsubvalue); - if ( SpellName ) then - PickupSpellBookItem(SpellName) + -- For some reason, that PVP spell needs to be called with PickupSpell instead of PickupSpellBookItem + if ( Subsubvalue == Const.PVP_SPELL_GLADIATORS_MEDALLION ) then + PickupSpell(Subsubvalue); + elseif ( SpellName ) then + PickupSpellBookItem(SpellName); else PickupSpell(Subsubvalue); end