View Single Post
08-08-20, 04:21 PM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,929
ADDON_LOADED event has one parameter .. the name of the addon ..

So, first, identify the precise addon name for Pitbull . Then in the if statement for testing whether the addon loaded is pitbull .. do your pitbull required functionality then.

This is an example from one of my nUI plugins. I check for both nUI and my own addon.. If this was a plugin that included a third addon window I would check for that as well and make sure all required addons are loaded once the plugin addon is loaded ..
Lua Code:
  1. local addonName, addon = ...
  2.     local function onEvent(self,event,arg1,arg2,arg3)
  3.         if ( event == "ADDON_LOADED" ) then
  4.             if arg1 == "nUI" then
  5.                 addon.nUILoaded = true
  6.             elseif arg1 == addonName then
  7.                 if not addon.nUILoaded then
  8.                     LoadAddOn("nUI")
  9.                 end
  10.                 addon.nUILoaded = IsAddOnLoaded("nUI")
  11.                 addon.plugin = plugin
  12.                 addon:OnAddonLoaded()
  13.             end
  14.         end
  15.     end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote