Thread Tools Display Modes
02-24-15, 06:45 AM   #1
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Enable addon only if glyphe and Class is right

OK I just found this nice MindHarvest AddOn by Alea. Not uploaded on any wow addon side thought. I have optimized the icon and position a bit to fit my nameplates.

Now I have a question, coud someone help me to add a check so that the addon:
1. Is only active if your class is Priest - no icon for other classes
2. Only showing the icon if you have Glyph of Mind Harvest active.

That woud be realy great

Lua Code:
  1. local core = CreateFrame("Frame")
  2. core:SetScript("OnEvent", function(self, event, ...)   
  3.     self[event](self, event, ...)
  4. end)
  5.  
  6. core.CreatedPlates = {}
  7. core.MindHarvest = {}
  8. core.ByBossName = {}
  9. core.ByName = {}
  10.  
  11. local numChildren = -1
  12. local twipe = table.wipe
  13. local tsort = table.sort
  14. local tinsert = table.insert
  15. local band = bit.band
  16. local gsub = string.gsub
  17. local tolower = string.lower
  18. local match = string.match
  19.  
  20. core.RaidTargetReference = {
  21.     ["STAR"] = 0x00000001,
  22.     ["CIRCLE"] = 0x00000002,
  23.     ["DIAMOND"] = 0x00000004,
  24.     ["TRIANGLE"] = 0x00000008,
  25.     ["MOON"] = 0x00000010,
  26.     ["SQUARE"] = 0x00000020,
  27.     ["CROSS"] = 0x00000040,
  28.     ["SKULL"] = 0x00000080,
  29. }
  30.  
  31. core.ByRaidIcon = {}
  32.  
  33. core.RaidIconCoordinate = {
  34.     [0]     = { [0]     = "STAR", [0.25]    = "MOON", },
  35.     [0.25]  = { [0]     = "CIRCLE", [0.25]  = "SQUARE", },
  36.     [0.5]   = { [0]     = "DIAMOND", [0.25] = "CROSS", },
  37.     [0.75]  = { [0]     = "TRIANGLE", [0.25]    = "SKULL", },
  38. }
  39.  
  40. local flagtort = {
  41.    [COMBATLOG_OBJECT_RAIDTARGET8] = "SKULL",
  42.    [COMBATLOG_OBJECT_RAIDTARGET7] = "CROSS",
  43.    [COMBATLOG_OBJECT_RAIDTARGET6] = "SQUARE",
  44.    [COMBATLOG_OBJECT_RAIDTARGET5] = "MOON",
  45.    [COMBATLOG_OBJECT_RAIDTARGET4] = "TRIANGLE",
  46.    [COMBATLOG_OBJECT_RAIDTARGET3] = "DIAMOND",
  47.    [COMBATLOG_OBJECT_RAIDTARGET2] = "CIRCLE",
  48.    [COMBATLOG_OBJECT_RAIDTARGET1] = "STAR",
  49.  }
  50.  
  51. local blacklist = {}
  52.  
  53. function core:CheckFilter(myPlate)
  54.     local name = gsub(self.mindHarvest.name:GetText(), '%s%(%*%)','')
  55.     local db = blacklist[name]
  56.  
  57.     if db and db.enable then
  58.         if db.hide then
  59.             myPlate:Hide()
  60.             return
  61.         else
  62.             if(not myPlate:IsShown()) then
  63.                 myPlate:Show()
  64.             end
  65.         end
  66.     elseif(not myPlate:IsShown()) then
  67.         myPlate:Show()
  68.     end
  69.     return true
  70. end
  71.  
  72. function core:ScanFrames(...)
  73.     for index = 1, select('#', ...) do
  74.         local frame = select(index, ...)
  75.         local name = frame:GetName()
  76.        
  77.         if(not core.CreatedPlates[frame] and (name and name:find("NamePlate%d"))) then
  78.             core:CreatePlate(frame)
  79.         end
  80.     end
  81. end
  82.  
  83. function core:UpdateMindHarvestStatus(frame)
  84.  
  85.  
  86.     if frame.mindHarvest.guid and core.MindHarvest[frame.mindHarvest.guid] then
  87.         frame.mindHarvest:Hide()
  88.     else   
  89.         frame.mindHarvest:Show()
  90.        
  91.         if frame.mindHarvest.guid then
  92.             frame.mindHarvest.status:SetText("|cff66ff00+|r")
  93.         else
  94.             frame.mindHarvest.status:SetText("|cffff0000?|r")
  95.         end
  96.     end
  97.    
  98. end
  99.  
  100. function core:SetUnitInfo(myPlate)
  101.     local plateName = gsub(self.mindHarvest.name:GetText(), '%s%(%*%)','')
  102.     if self:GetAlpha() == 1 and core.targetName and (core.targetName == plateName) then
  103.         self.mindHarvest.guid = UnitGUID("target")
  104.        
  105.         self.mindHarvest.unit = "target"
  106.        
  107.         core:UpdateMindHarvestStatus(self)
  108.        
  109.         self.mindHarvest:SetFrameLevel(2)
  110.        
  111.         if((core.NumTargetChecks > -1) or self.mindHarvest.allowCheck) then
  112.             core.NumTargetChecks = core.NumTargetChecks + 1
  113.             if core.NumTargetChecks > 0 then
  114.                 core.NumTargetChecks = -1
  115.             end
  116.  
  117.             self.mindHarvest.allowCheck = nil
  118.         end
  119.  
  120.     elseif self.mindHarvest.highlight:IsShown() and UnitExists("mouseover") and (UnitName("mouseover") == plateName) then
  121.         self.mindHarvest.guid = UnitGUID("mouseover")
  122.        
  123.         if(self.mindHarvest.unit ~= "mouseover" or self.mindHarvest.allowCheck) then   
  124.             self.mindHarvest.allowCheck = nil
  125.         end
  126.        
  127.        
  128.         core:UpdateMindHarvestStatus(self)
  129.        
  130.         self.mindHarvest:SetFrameLevel(1)
  131.        
  132.         self.mindHarvest.unit = "mouseover"    
  133.     else
  134.         self.mindHarvest.unit = nil
  135.        
  136.         self.mindHarvest:SetFrameLevel(0)
  137.        
  138.         core:UpdateMindHarvestStatus(self)
  139.     end
  140. end
  141.  
  142. function core:OnHide()
  143.     local myPlate = core.CreatedPlates[self]
  144.     self.mindHarvest.unitType = nil
  145.     self.mindHarvest.guid = nil
  146.     self.mindHarvest.unit = nil
  147.     self.mindHarvest.allowCheck = nil
  148.  
  149.     myPlate:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT") --Prevent nameplate being in random location on screen when first shown
  150. end
  151.  
  152. function core:OnShow()
  153.     local myPlate = core.CreatedPlates[self]
  154.     if(not core.CheckFilter(self, myPlate)) then return end
  155.  
  156.     core.ColorizeAndScale(self, myPlate)
  157.     core:CheckRaidIcon(self)
  158.     self.mindHarvest.allowCheck = true
  159. end
  160.  
  161. function core:CreatePlate(frame)
  162.    
  163.     local mindHarvest = CreateFrame("Frame", nil, self.ParentFrame)
  164.     mindHarvest:SetSize(18, 18)
  165.    
  166.     mindHarvest.barFrame, mindHarvest.nameFrame = frame:GetChildren()
  167.     mindHarvest.healthBar = mindHarvest.barFrame:GetChildren()
  168.    
  169.     mindHarvest.threat, _, mindHarvest.highlight, _, mindHarvest.bossIcon, mindHarvest.raidIcon = mindHarvest.barFrame:GetRegions()
  170.     mindHarvest.name = mindHarvest.nameFrame:GetRegions()
  171.    
  172.    
  173.     if not mindHarvest.raidIcon and frame.icon then
  174.         mindHarvest.raidIcon = frame.icon
  175.     end
  176.    
  177.     if(self.viewPort) then
  178.         mindHarvest:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT")
  179.     end
  180.    
  181.     mindHarvest:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT")
  182.    
  183.     mindHarvest:SetFrameStrata("BACKGROUND")
  184.     mindHarvest:SetFrameLevel(0)
  185.     mindHarvest:SetScale(0.7) -- update
  186.    
  187.     mindHarvest.iconf = CreateFrame("Frame", nil, mindHarvest)
  188.     mindHarvest.iconf:SetSize(18, 18)
  189.     mindHarvest.iconf:SetPoint("BOTTOMLEFT", mindHarvest, "TOPLEFT", 0, 20)
  190.    
  191.    
  192.     mindHarvest.icon = mindHarvest.iconf:CreateTexture(nil, 'OVERLAY')
  193.     mindHarvest.icon:SetTexCoord(.1, .9, .2, .8)
  194.     mindHarvest.icon:SetTexture("Interface\\icons\\spell_warlock_harvestoflife")
  195.     mindHarvest.icon:SetAllPoints(mindHarvest.iconf)
  196.    
  197.     mindHarvest.status = mindHarvest.iconf:CreateFontString(nil, 'OVERLAY')
  198.     mindHarvest.status:SetPoint("CENTER", mindHarvest.iconf, "CENTER", 1, -1)
  199.     mindHarvest.status:SetJustifyH("LEFT")
  200.     mindHarvest.status:SetFont(STANDARD_TEXT_FONT, 16, "THICKOUTLINE")
  201.    
  202.     mindHarvest.status:SetText("TEST")
  203.  
  204.     mindHarvest:Show()
  205.    
  206.     frame.mindHarvest = mindHarvest
  207.    
  208.     frame:HookScript("OnShow", core.OnShow)
  209.     frame:HookScript("OnHide", core.OnHide)
  210.    
  211.     self.CreatedPlates[frame] = mindHarvest
  212. end
  213.  
  214. function core:SetAlpha(plate)
  215.     if self:GetAlpha() < 1 then
  216.         plate:SetAlpha(0.7)
  217.     else
  218.         plate:SetAlpha(1)
  219.     end
  220. end
  221.  
  222. function core:OnUpdate(elapsed)
  223.  
  224.     local count = WorldFrame:GetNumChildren()
  225.     if(count ~= numChildren) then
  226.         numChildren = count
  227.         core:ScanFrames(WorldFrame:GetChildren())
  228.     end
  229.    
  230.     core.PlateParent:Hide()
  231.     for blizzPlate, plate in pairs(core.CreatedPlates) do
  232.         if(blizzPlate:IsShown()) then
  233.             if(not self.viewPort) then
  234.                 plate:SetPoint("CENTER", WorldFrame, "BOTTOMLEFT", blizzPlate:GetCenter())
  235.             end
  236.            
  237.             core.SetAlpha(blizzPlate, plate)
  238.            
  239.         else
  240.             plate:Hide()
  241.         end
  242.     end
  243.     core.PlateParent:Show()
  244.    
  245.     if(self.mindharvest and self.mindharvest > 0.2) then
  246.         for blizzPlate, plate in pairs(core.CreatedPlates) do
  247.             if(blizzPlate:IsShown() and plate:IsShown()) then
  248.                 core.SetUnitInfo(blizzPlate, plate)
  249.                 core.ColorizeAndScale(blizzPlate, plate)
  250.             end
  251.         end
  252.  
  253.         self.mindharvest = 0
  254.     else
  255.         self.mindharvest = (self.mindharvest or 0) + elapsed
  256.     end
  257.    
  258. end
  259.  
  260. function core:RoundColors(r, g, b) 
  261.     return floor(r*100+.5)/100, floor(g*100+.5)/100, floor(b*100+.5)/100
  262. end
  263.  
  264. function core:GetReaction(frame)
  265.     local r, g, b = core:RoundColors(frame.mindHarvest.healthBar:GetStatusBarColor())
  266.  
  267.     for class, _ in pairs(RAID_CLASS_COLORS) do
  268.         local bb = b
  269.         if class == 'MONK' then
  270.             bb = bb - 0.01
  271.         end
  272.        
  273.         if RAID_CLASS_COLORS[class].r == r and RAID_CLASS_COLORS[class].g == g and RAID_CLASS_COLORS[class].b == bb then
  274.             return class
  275.         end
  276.     end
  277.  
  278.     if (r + b + b) == 1.59 then
  279.         return 'TAPPED_NPC'
  280.     elseif g + b == 0 then
  281.         return 'HOSTILE_NPC'
  282.     elseif r + b == 0 then
  283.         return 'FRIENDLY_NPC'
  284.     elseif r + g > 1.95 then
  285.         return 'NEUTRAL_NPC'
  286.     elseif r + g == 0 then
  287.         return 'FRIENDLY_PLAYER'
  288.     else
  289.         return 'HOSTILE_PLAYER'
  290.     end
  291. end
  292.  
  293. function core:ColorizeAndScale(myPlate)
  294.     self.mindHarvest.unitType = core:GetReaction(self) 
  295. end
  296.  
  297. core:RegisterEvent("PLAYER_LOGIN") 
  298.  
  299. function core:UPDATE_MOUSEOVER_UNIT()
  300.     WorldFrame.mindharvest = 0.1
  301. end
  302.  
  303.  
  304. function core:PLAYER_TARGET_CHANGED()
  305.     if(UnitExists("target")) then
  306.         self.targetName = UnitName("target")
  307.         WorldFrame.mindharvest = 0.1
  308.         core.NumTargetChecks = 0
  309.     else
  310.         self.targetName = nil
  311.     end
  312. end
  313.  
  314. function core:INSTANCE_ENCOUNTER_ENGAGE_UNIT()
  315.     for i=1, MAX_BOSS_FRAMES do
  316.         local unit = format("boss%d", i)
  317.        
  318.         if UnitExists(unit) then --and UnitClassification(unit) == "worldboss" then
  319.             core.ByBossName[UnitName(unit)] = UnitGUID(unit)
  320.         end
  321.     end
  322. end
  323.  
  324. function core:ARENA_OPPONENT_UPDATE()
  325.     for i=1, 5 do
  326.         local unit = format("arena%d", i)
  327.        
  328.         if UnitExists(unit) then --and UnitClassification(unit) == "worldboss" then
  329.             core.ByName[UnitName(unit)] = UnitGUID(unit)
  330.         end
  331.        
  332.     end
  333. end
  334. local function MindHarvestAssist(destGUID,destName,destFlags,destRaidFlags)
  335.     if destGUID and not core.MindHarvest[destGUID] then
  336.         local name, raidIcon
  337.        
  338.         if band(destFlags, COMBATLOG_OBJECT_CONTROL_PLAYER) > 0 and destName then
  339.             local rawName = strsplit("-", destName)         -- Strip server name from players
  340.             core.ByName[rawName] = destGUID
  341.             name = rawName
  342.         end
  343.        
  344.         if flagtort[destRaidFlags] then
  345.             core.ByRaidIcon[flagtort[destRaidFlags]] = destGUID
  346.             raidIcon = flagtort[destRaidFlags]
  347.         end
  348.        
  349.         if core.ByBossName[destName] and destName then
  350.             name = destName
  351.         end
  352.  
  353.         core.MindHarvest[destGUID] = true
  354.     end
  355. end
  356.  
  357. function core:COMBAT_LOG_EVENT_UNFILTERED(_, _, event, ...)
  358.     local _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName, _, auraType, stackCount  = ...
  359.  
  360.     if event == "SPELL_DAMAGE" and sourceGUID == UnitGUID("player") and spellID == 8092 then
  361.         MindHarvestAssist(destGUID,destName,destFlags,destRaidFlags)
  362.     end
  363.    
  364.     if  event == "SPELL_AURA_APPLIED" or
  365.         event == "SPELL_AURA_REFRESH" or
  366.         event == "SPELL_AURA_APPLIED_DOSE" or
  367.         event == "SPELL_AURA_REMOVED_DOSE" or
  368.         event == "SPELL_AURA_BROKEN" or
  369.         event == "SPELL_AURA_BROKEN_SPELL" or
  370.         event == "SPELL_AURA_REMOVED" then 
  371.  
  372.         local name, raidIcon
  373.         if band(destFlags, COMBATLOG_OBJECT_CONTROL_PLAYER) > 0 and destName then
  374.             local rawName = strsplit("-", destName)         -- Strip server name from players
  375.             core.ByName[rawName] = destGUID
  376.         end
  377.  
  378.         if flagtort[destRaidFlags] then
  379.             core.ByRaidIcon[flagtort[destRaidFlags]] = destGUID
  380.             raidIcon = flagtort[destRaidFlags]
  381.         end
  382.     end
  383. end
  384.  
  385. function core:PLAYER_LOGIN()
  386.  
  387.     self.PlateParent = CreateFrame("Frame", nil, WorldFrame)
  388.     self.PlateParent:SetFrameStrata("BACKGROUND")
  389.     self.PlateParent:SetFrameLevel(0)  
  390.     WorldFrame:HookScript('OnUpdate', core.OnUpdate)
  391.    
  392.     self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  393.     self:RegisterEvent("PLAYER_TARGET_CHANGED")
  394.     self:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
  395.     self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT")
  396.     self:RegisterEvent("ARENA_OPPONENT_UPDATE")
  397. end
  398.  
  399. function core:CheckRaidIcon(frame)
  400.     if frame.mindHarvest.raidIcon:IsShown() then
  401.         local ux, uy = frame.mindHarvest.raidIcon:GetTexCoord()
  402.         frame.mindHarvest.raidIconType = core.RaidIconCoordinate[ux][uy]   
  403.     else
  404.         frame.mindHarvest.raidIconType = nil;
  405.     end
  406. end
  407.  
  408. function core:SearchNameplateByGUID(guid)
  409.     for frame, _ in pairs(core.CreatedPlates) do
  410.         if frame and frame:IsShown() and frame.mindHarvest.guid == guid then
  411.             return frame
  412.         end
  413.     end
  414. end
  415.  
  416. function core:SearchNameplateByName(sourceName)
  417.     if not sourceName then return; end
  418.     local SearchFor = strsplit("-", sourceName)
  419.  
  420.     for frame, myPlate in pairs(core.CreatedPlates) do
  421.         if frame and frame:IsShown() then
  422.             if ( myPlate.mindHarvest.nameText == SearchFor and RAID_CLASS_COLORS[frame.mindHarvest.unitType] ) then
  423.                 return frame
  424.             elseif ( core.ByBossName[sourceName] and frame.mindHarvest.name:GetText() == sourceName ) then         
  425.                 return frame
  426.             end
  427.         end
  428.     end
  429. end
  430.  
  431. function core:SearchNameplateByIconName(raidIcon)
  432.     for frame, _ in pairs(core.CreatedPlates) do
  433.         core:CheckRaidIcon(frame)
  434.         if frame and frame:IsShown() and frame.mindHarvest.raidIcon:IsShown() and (frame.mindHarvest.raidIconType == raidIcon) then
  435.             return frame
  436.         end
  437.     end    
  438. end
  439.  
  440. function core:SearchForFrame(guid, raidIcon, name)
  441.     local frame
  442.  
  443.     if guid then frame = self:SearchNameplateByGUID(guid) end
  444.     if (not frame) and name then frame = self:SearchNameplateByName(name) end
  445.     if (not frame) and raidIcon then frame = self:SearchNameplateByIconName(raidIcon) end
  446.  
  447. end
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote
02-24-15, 08:22 AM   #2
odjur84
A Fallenroot Satyr
 
odjur84's Avatar
Join Date: Jan 2015
Posts: 24
Hi!

I don't know if I get, where your question aims to, but I would add something like

Code:
local classname, classFileName = UnitClassBase("player");
local b = false;
for i = 1, GetNumGlyphSockets() do
     _, _, _, glyphSpellID, _ = GetGlyphSocketInfo(i);
     if (glyphSpellID == 162532) then 
         b = true;
         break;
     end
end
if (classname ~= "Priest" or b == false) then
     core:Hide();
end
I don't know if this was helpful, since I'm just beginning with LUA and creating addons, but I hope it!

Cheers,

odjur84

[Edit: You may want to use classFileName rather than classname, because classname is localized and classFileName isn't. But I don't know the output of classFileName.]

Last edited by odjur84 : 02-24-15 at 08:29 AM.
  Reply With Quote
02-24-15, 10:38 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,323
The function is UnitClass() and classFileName is usually the English name in all caps. The function also has a 3rd return since MoP that returns an index number related to what class the unit is.

On another note, if the entire addon is in one file, you could use return to stop execution of the file if in the main chunk.

Lua Code:
  1. local _,class,id=UnitClass("Player");
  2.  
  3. --  You can use either of these, they both point to the same class
  4. if class=="PRIEST" then return; end
  5. if id==5 then return; end

Class ID is documented here.



PS: I don't know if glyph data is available immediately at login or if you need to wait for PLAYER_LOGIN to fire.
You should still load even if you don't detect the glyph initially as glyphs can be changed by the player while logged in. Perhaps put the addon into a sleep state until it sees the glyph by login, spec change, or glyph swap.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 02-24-15 at 10:49 AM.
  Reply With Quote
02-24-15, 04:21 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by SDPhantom View Post
local _,class,id=UnitClass("Player");
Technically speaking, "Player" is not a valid unit token; even though the game will auto-correct to "player" for you, it's best to be in the habit of using the correct capitalization.

Originally Posted by SDPhantom View Post
if class=="PRIEST" then return; end
I'd suggest additionally disabling the addon if the player isn't a priest; it's not like the same character who isn't a priest today will suddenly become one tomorrow.

Code:
local ADDON_NAME = ...
if select(2, UnitClass("player")) ~= "PRIEST" then return DisableAddOn(ADDON_NAME) end
Originally Posted by SDPhantom View Post
PS: I don't know if glyph data is available immediately at login or if you need to wait for PLAYER_LOGIN to fire. You should still load even if you don't detect the glyph initially as glyphs can be changed by the player while logged in. Perhaps put the addon into a sleep state until it sees the glyph by login, spec change, or glyph swap.
Glyph information almost certainly falls into the same category other similar types of information -- it's available immediately after reloading the UI, but not on a fresh login. Instead of registering for other events in PLAYER_LOGIN, register for GLYPH_ADDED and GLYPH_REMOVED. When one of those fires, check for the glyph, and then register or unregister all the other events based on whether it's found or not. You'd probably also want to hide any currently-shown frames when the glyph is removed.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
02-24-15, 04:52 PM   #5
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Thank everyone! Now I'm very confused thought I have tryed to mash some of the code snips from here together with no success.
Phanx code:
Code:
local ADDON_NAME = MindHarvest
if select(2, UnitClass("player")) ~= "PRIEST" then return DisableAddOn(ADDON_NAME) end
results in this error if I login on any char but a priest
Code:
1x MindHarvest\core.lua:5: Usage: DisableAddOn(index or "name", [set for all or "character"])
[C]: in function `DisableAddOn'
MindHarvest\core.lua:5: in main chunk

Locals:
ADDON_NAME = nil


And glyphe part.. I just don't know where to start it looks nice but its not working
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________

Last edited by Tonyleila : 02-24-15 at 04:56 PM.
  Reply With Quote
02-24-15, 05:02 PM   #6
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
MindHarvest is the name of a variable
Did you define its value anywhere? Probably no, so you defining ADDON_NAME as nil then trying to Disable an addon named nil. Just use the proposed code:
local ADDON_NAME = ...
or at least
local ADDON_NAME = "MindHarvest"

Last edited by Banknorris : 02-24-15 at 06:05 PM.
  Reply With Quote
02-24-15, 05:19 PM   #7
Tonyleila
A Molten Giant
 
Tonyleila's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 758
Thanks Banknorris thats works fine
__________________
Author of: LeilaUI and Aurora: Missing Textures
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Enable addon only if glyphe and Class is right

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off