Skip to content

Commit

Permalink
Update enchants for WoD
Browse files Browse the repository at this point in the history
Seriously, blizzard kinda ruined the UI/API for the old enchants.  I'm
just dropping them, it's not worth fixing.
  • Loading branch information
tekkub committed Dec 27, 2014
1 parent 35b2bfd commit 4d93200
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 174 deletions.
166 changes: 12 additions & 154 deletions Enchanting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,172 +8,30 @@ local function NoSpelltips(id, f) f.tiplink = nil end
local function MakeMacro(frame)
local id, extra = frame.id, frame.extra

if extra then
return "/run if IsShiftKeyDown() then "..
" ChatEdit_InsertLink(select(2, GetItemInfo("..id.."))) "..
" end\n"..
"/stopmacro [mod:shift]\n"..
"/run CloseTradeSkill()\n"..
"/cast "..NAME.."\n"..
"/run for i=1,GetNumTradeSkills() do "..
" local l = GetTradeSkillRecipeLink(i) "..
" if l and l:match('enchant:"..extra.."') then "..
" TradeSkillFrame_SetSelection(i) "..
" if not IsAltKeyDown() then DoTradeSkill(i) end "..
" end "..
" end "..
" if not IsAltKeyDown() then CloseTradeSkill() end\n"..
"/use item:38682"
end

return "/run if IsShiftKeyDown() then "..
" ChatEdit_InsertLink(select(2, GetItemInfo("..id.."))) "..
" end\n"..
"/stopmacro [mod:shift]\n"..
"/run CloseTradeSkill()\n"..
"/cast "..NAME.."\n"..
"/run local chantname = GetItemInfo("..id.."):gsub(\""..L["Scroll of "].."\", '') "..
" for i=1,GetNumTradeSkills() do "..
" if GetTradeSkillInfo(i) == chantname then "..
" TradeSkillFrame_SetSelection(i) "..
" if not IsAltKeyDown() then DoTradeSkill(i) end "..
" end "..
" end "..
" if not IsAltKeyDown() then CloseTradeSkill() end\n"..
"/run for i=1,GetNumTradeSkills() do "..
" local l = GetTradeSkillRecipeLink(i) "..
" if l and l:match('enchant:"..extra.."') then "..
" TradeSkillFrame_SetSelection(i) "..
" if not IsAltKeyDown() then DoTradeSkill(i) end "..
" end "..
" end "..
" if not IsAltKeyDown() then CloseTradeSkill() end\n"..
"/use item:38682"
end


Panda.panel:RegisterFrame(L["Draenor"], Panda.PanelFactory(SPELLID,
[[110617:CRIT 110618:HASTE 110619:MAS 110620:MULT 110621:VERS 110638:CRIT 110639:HASTE 110640:MAS 110641:MULT 110642:VERS
110624:CRIT 110625:HASTE 110626:MAS 110627:MULT 110628:VERS 110645:CRIT 110646:HASTE 110647:MAS 110648:MULT 110649:VERS
110631:CRIT 110632:HASTE 110633:MAS 110634:MULT 110635:VERS 110652:CRIT 110653:HASTE 110654:MAS 110655:MULT 110656:VERS
[[110617:158907:CRIT 110618:158908:HASTE 110619:158909:MAS 110620:158910:MULT 110621:158911:VERS 110638:158914:CRIT 110639:158915:HASTE 110640:158916:MAS 110641:158917:MULT 110642:158918:VERS
110624:158892:CRIT 110625:158893:HASTE 110626:158894:MAS 110627:158895:MULT 110628:158896:VERS 110645:158899:CRIT 110646:158900:HASTE 110647:158901:MAS 110648:158902:MULT 110649:158903:VERS
110631:158877:CRIT 110632:158878:HASTE 110633:158879:MAS 110634:158880:MULT 110635:158881:VERS 110652:158884:CRIT 110653:158885:HASTE 110654:158886:MAS 110655:158887:MULT 110656:158889:VERS
0
110682:CRIT 112164:HASTE 112115:SPI 112165:MULT 112160:ARM 118015:MAS 112093:BLD
115973:CRIT 115977:HASTE 115975:SPI 115978:MULT 115976:ARM
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["All Panda"], Panda.PanelFactory(SPELLID,
[[74729:INT 74250x3 0 0 89737:PARRY 74250x3 74247x1 0 74717:AGI 74247x2 0 0 74708:STAT 74249x2 74250x3
0 0 0 0 0 0 0 0 74715:HASTE 74249x2 74250x1 0 74707:SPI 74249x4
74727:DEF 74247x3 0 0 74704:STR 74248x3 0 0 74716:HIT 74249x2 74250x1 0 74706:RES 74249x3 74250x1
74726:STAT 74249x12 74248x10 0 74705:AGI 74248x3 0 0 74718:MAS 74249x4 74250x3 0 74709:STA 74249x4 74250x1
74725:DAM 74250x3 0 0 74701:DOD 74249x8 74250x2
74724:INT 74250x4 74248x10 0 74700:MAS 74249x4 0 0 74712:INT 74249x3 74250x3 0 74719:HASTE 74249x4
74728:DOD 76138x1 74250x50 0 74703:INT 74248x3 0 0 74710:HIT 74249x7 0 0 74721:STR 74249x3 74250x1 74247x1
74723:STAT 74249x12 74247x1 0 0 0 0 0 74711:STA 74247x2 0 0 74720:EXP 74250x2
0 0 0 0 0 0 0 0 74713:CRIT 74250x1 0 0 74722:MAS 74250x3
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["All Cat"], Panda.PanelFactory(SPELLID,
[[52743:STA 52750:HASTE 52757:AGI 52769:HIT 52781:AGI 52771:MAS 52782:MAS 0 52754:ARM 52762:BLKR
52763:DOD 52766:HIT 52770:SPI 52772:EXP 52752:CRIT 52778:CRIT 52746:HASTE 52785:HASTE 68784:AGI 68785:STR 68786:INT
52758:RES 52765:SPI 52744:STAT 52779:STAT 52751:STA 52780:STA
52745:SPEN 52767:ARM 52753:INT 52773:INT 52764:CRIT 52777:CRIT
52749:HASTE 52756:STR 52759:EXP 52783:STR 52784:MAS
52747:CRUSADER 52748:NAT 52755:ELEM 52760:HASTE 52761:SPI 52774:INT 52775:DOD 52776:AP 0 52768:INT 0 68134:AGI
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["All Wrath"], Panda.PanelFactory(SPELLID,
[[38976:AGI 38943:SPE 39006:SPE 44449:AP 44469:AP 38966:STA 38961:SPI 38974:HMP 38986:HIT 0 0 0 0 0 0 38954:DEF 44455:INT
38984:44598:EXP 38987:STAT 38902:STA 44947:62256:STA 38971:AP 44815:AP 38968:INT 38997:SP 44470:60767:SP 38980:SPI
38955:HP 39005:HP 39002:DEF 38912:MP 38962:MPR 38989:STAT 44465:STAT 38975:RES
38959:AGI 44457:AGI 39001:ARM 44456:HASTE 39003:HASTE 38973:SPEN 39004:FADE 38993:STL 38978:DEF 0 0 0 38969:RFI 38977:RSH 38982:RAR 38956:RNA 38950:RFR
38967:AGI 38964:AP 44458:AP 38953:HIT 38951:EXP 38990:THREAT 38979:SP 0 50816:FISH 38960:GATHER 0 0 0 0 38992:AP 44463:AP 38981:UNDEAD
38995:AGI 44453:AP 44466:AP 38963:SPI 38991:SP 44467:SP 44493:BERSERK 38965:FIERY 43987:UNHOLY 38972:CRUSADER 46098:LIFESTEAL 44497:HIT 46026:PARRY 38988:GIANT 0 45060:SP 45056:SP
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Boots"], Panda.PanelFactory(SPELLID,
[[38786:AGI 38807:AGI 38844:AGI 38863:AGI 37603:AGI 38976:AGI 0 38943:SPE 0 44449:AP 44469:AP
38785:STA 38810:STA 38830:STA 38862:STA 38909:STA 38966:STA 0 38944:SPE 39006:SPE
38819:SPI 38864:SPI 38961:SPI 0 38908:HMP 38974:HMP 0 38837:SPE 0 45628:HIT 38910:HIT 38986:HIT
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Bracer"], Panda.PanelFactory(SPELLID,
[[38768:DEF 38811:DEF 38842:DEF 38899:DEF 0 38984:44598:EXP 0 38898:STAT 38987:STAT
38771:STA 38793:STA 38812:STA 38849:STA 38855:STA 38902:STA 44947:62256:STA 0 38679:HP 0 38777:AGI 68784:AGI
38778:STR 38797:STR 38817:STR 38846:STR 38854:STR 38897:STR 68785:STR 0 38938:AP 38971:AP 44815:AP
38803:INT 38829:INT 38852:INT 38937:INT 38968:INT 68786:INT 0 38882:SP 38900:SP 38903:SP 38997:SP 44470:60767:SP
38774:SPI 38783:SPI 38809:SPI 38832:SPI 38853:SPI 38980:SPI 0 38881:MPR 38901:MPR
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Chest"], Panda.PanelFactory(SPELLID,
[[38766:HP 38773:HP 38782:HP 38808:HP 38833:HP 38866:HP 38911:HP 38955:HP 39005:HP 0 38767:DEF 38798:DEF 38999:DEF 39002:DEF
38769:MP 38776:MP 38799:MP 38818:MP 38841:MP 38867:MP 38912:MP 0 0 0 38929:MPR 38962:MPR 0 38928:SPI
38804:STAT 38824:STAT 38847:STAT 38865:STAT 38913:STAT 38989:STAT 44465:STAT 0 0 0 38930:RES 38975:RES
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Cloak"], Panda.PanelFactory(SPELLID,
[[38789:AGI 38835:AGI 38940:AGI 38959:AGI 44457:AGI 0 0 0 0 0 0 0 0 38770:RALL 38826:RALL 38858:RALL 38915:RALL
38775:ARM 38790:ARM 38806:ARM 38825:ARM 38859:ARM 38914:ARM 39001:ARM 0 0 0 0 0 0 38784:RFI 38815:RFI 38891:RFI 38969:RFI
0 0 0 0 0 0 0 0 0 0 0 0 0 0 38795:RSH 38942:RSH 38977:RSH
0 0 38939:SPEN 38894:FADE 38893:STL 39000:DEF 38895:DOD 0 0 0 0 0 0 0 0 38941:RAR 38982:RAR
44456:HASTE 39003:HASTE 38973:SPEN 39004:FADE 38993:STL 38978:DEF 0 0 0 0 0 0 0 0 0 38892:RNA 38956:RNA
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 38950:RFR
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Gloves"], Panda.PanelFactory(SPELLID,
[[38850:MOUNT 0 38802:FISH 50816:FISH 38823:SKIN 38801:HERB 38834:HERB 38800:MINE 38831:MINE 38960:GATHER
38827:AGI 38856:AGI 38890:AGI 38967:AGI 0 38836:STR 38857:STR 38933:STR 0 38934:AP 38964:AP 44458:AP
38932:HIT 38953:HIT 0 38931:CRIT 0 38951:EXP 0 38851:HASTE 0 38885:THREAT 38990:THREAT
38888:FIP 38887:FRP 38886:SHP 0 38889:SP 38936:SP 38935:SP 38979:SP
74722:MAS
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Shield"], Panda.PanelFactory(SPELLID,
[[38787:STA 38805:STA 38828:STA 38861:STA 38945:STA 0 0 38949:RES
38791:ARM 0 38904:BLKV 0 38820:BLKR 38906:BLKR 0 38954:DEF
38792:SPI 38816:SPI 38839:SPI 38860:SPI 0 38905:INT 44455:INT
38843:RFR 0 38907:RALL
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
end))


Panda.panel:RegisterFrame(L["Enchant Weapon"], Panda.PanelFactory(SPELLID,
[[38780:DAM 38794:DAM 38821:DAM 38848:DAM 38870:DAM 38917:DAM 0 0 0 0 0 0 38772:DAM 38796:DAM 38822:DAM 38845:DAM 38869:DAM
38880:AGI 38947:AGI 38995:AGI 0 38879:STR 38920:STR 0 44453:AP 44466:AP 0 0 38896:AGI 38922:AGI 0 38919:AP 38992:AP 44463:AP
38883:SPI 38963:SPI 0 38884:INT 38918:INT 0 0 0 0 0 0 0 38788:SPI 38874:SPI 0 38781:INT 38875:INT
38878:SP 38877:SP 38946:SP 38921:SP 38991:SP 44467:SP 0 0 0 0 0 0 0 0 0 45060:SP 45056:SP
38876:WINTER 38838:FIERY 38868:FROST 38872:UNHOLY 38873:CRUSADER 38871:LIFESTEAL 0 38925:MONGOOSE 38927:LIFESTEAL 38926:MPR 38924:SOULFROST 38923:SUNFIRE
44493:BERSERK 38965:FIERY 38998:FROST 43987:UNHOLY 38972:CRUSADER 46098:LIFESTEAL 44497:HIT 46026:PARRY 0 0 38779:BEAST 38813:BEAST 38814:ELEM 38840:DEMON 38988:GIANT 0 38981:UNDEAD
110682:159235:CRIT 112164:159671:HASTE 118015:173323:MAS 112165:159672:MULT 112115:159673:SPI 112160:159674:ARM 112093:159236:BLD
]], NoSpelltips, function(frame)
frame:SetAttribute("type", "macro")
frame:SetAttribute("macrotext", MakeMacro(frame))
Expand Down
25 changes: 5 additions & 20 deletions PanelFactory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,6 @@ end

local function noop() end

local function AddToData(name)
if GetLocale() == "deDE" then -- inconsistent naming up to Cataclysm enchants
local target, enchant = string.split("-", name)
target, enchant = string.trim(target), string.trim(enchant)
if target == "Handschuhe" then
knowncombines["Rolle der Handschuhverzauberung - "..enchant] = true
elseif target == "Waffe" or target == "Armschiene" or target == "Zweihandwaffe" then
knowncombines["Rolle der "..target.."nverzauberung - "..enchant] = true
else
knowncombines["Rolle der "..target.."verzauberung - "..enchant] = true
end
else
knowncombines["Scroll of "..name] = true
end
knowncombines[name] = true
end

function Panda:PanelFiller()
knowncombines = ns.db.knowns
local buttons = {}
Expand Down Expand Up @@ -186,15 +169,17 @@ function Panda:PanelFiller()
if canCraft and not tracker and next(unknown) then
self:SetScript("OnEvent", function()
if IsTradeSkillLinked() or IsTradeSkillGuild() then return end
local lasttitle = ""
for i=1,GetNumTradeSkills() do
local name, rowtype, _, _, skilltype = GetTradeSkillInfo(i)
local spelllink = GetTradeSkillRecipeLink(i)
local link = GetTradeSkillItemLink(i)
if rowtype ~= "header" and link then
if rowtype == "header" or rowtype == "subheader" then
lasttitle = name
elseif link then
local spellid = spelllink:match("enchant:(%d+)")
knowncombines[tonumber(spellid) + 0.1] = true
if skilltype == ENSCRIBE then AddToData(name)
elseif ns.ids[link] then knowncombines[ns.ids[link]] = true end
if ns.ids[link] then knowncombines[ns.ids[link]] = true end
end
end
for f in pairs(unknown) do f:SetAlpha(known[f] and 1 or 0.25) end
Expand Down

0 comments on commit 4d93200

Please sign in to comment.