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:
local addonName, addon = ...
local function onEvent(self,event,arg1,arg2,arg3)
if ( event == "ADDON_LOADED" ) then
if arg1 == "nUI" then
addon.nUILoaded = true
elseif arg1 == addonName then
if not addon.nUILoaded then
LoadAddOn("nUI")
end
addon.nUILoaded = IsAddOnLoaded("nUI")
addon.plugin = plugin
addon:OnAddonLoaded()
end
end
end