BattlePetCount NG

BattlePetCount NG

12k Downloads

[suggestion] Add compatibility with PetTracker’s tooltip text

tflo opened this issue · 3 comments

commented

First of all, many thanks for continuing this very useful addon!

There is a pet cage tooltip conflict issue with PetTracker’s source/vendor/zone infos:

WoWScrnShot_051923_172125


I know, I could simply disable BPC’s pet cage tooltips, but the thing is that I use different addon setups for different situations. In most of them, only BPC is loaded, in some of them, PetTracker is loaded in addition. So I would have to constantly enable/disable BPC’s “Caged Pet Tooltip” setting.

Hence, my current local solution is to automate the enabling/disabling via a ‘quick and dirty’ check if PetTracker is loaded. Here the diff:

Common subdirectories: /Users/tom/Downloads/BattlePetCount/Libs and /Applications/World of Warcraft/_retail_/Interface/AddOns/BattlePetCount/Libs
Common subdirectories: /Users/tom/Downloads/BattlePetCount/Locales and /Applications/World of Warcraft/_retail_/Interface/AddOns/BattlePetCount/Locales
Common subdirectories: /Users/tom/Downloads/BattlePetCount/Media and /Applications/World of Warcraft/_retail_/Interface/AddOns/BattlePetCount/Media
diff -ub /Users/tom/Downloads/BattlePetCount/Tooltips.lua /Applications/World of Warcraft/_retail_/Interface/AddOns/BattlePetCount/Tooltips.lua
--- /Users/tom/Downloads/BattlePetCount/Tooltips.lua	2023-05-19 16:50:25
+++ /Applications/World of Warcraft/_retail_/Interface/AddOns/BattlePetCount/Tooltips.lua	2023-05-19 17:17:18
@@ -27,7 +27,10 @@
     self:ADDON_LOADED()
 end
 
+local pettracker_loaded
+
 function module:ADDON_LOADED()
+    pettracker_loaded = IsAddOnLoaded 'PetTracker'
     if not self.LibExtraTip then
         self.LibExtraTip = LibStub("LibExtraTip-1", true)
         if self.LibExtraTip then
@@ -107,7 +110,7 @@
     end
 
     local Owned = tip.Owned
-    if not addon.db.profile.enableCageTip then
+    if not addon.db.profile.enableCageTip or pettracker_loaded then
         -- pass
     elseif addon.db.profile.useSubTip then
         if Owned and Owned:IsShown() then


The enabling/disabling is only necessary for pet cage tootltips, as PetTracker does not provide its tooltip info for pet installer items (“Teaches you how to summon…”) or for wild pets.

After brief testing, it seems my hack does what it is supposed to, however it is not ideal, because I largely prefer BPC’s letter notation for breeds over PetTracker’s tiny icons.

So, probably the better solution would be to make the tooltip texts not overlap.

I know, this would result in redundant information (collected breeds info from BPC + the same from PetTracker), but PetTracker can very easily be prevented from displaying its GetOwnedText() by just modifying one line in its code. So, this is not a thing. The result would then be ideal:

Source/vendor and zone infos from PetTracker + collected breeds info from BPC!

Unfortunately, I don't have the slightest clue about the current tooltip API, so I didn't even try to make the tooltips compatible ;)

– Tom


PS:

I also tried with BPC’s “attached tooltip”, but that one gets overlapped by BattlePetBreedID’s and/or TSM’s and/or Oribos Exchange’s attached tooltips. (And I guess, it will be a nightmare to get the right anchoring order with so many competing tooltip attachments.). Besides that, it’s nicer to have the info inside the normal tooltip.

commented

Hey,

Since PetTracker has made it clear that it is not open source, even though the author tried to brand it as such earlier (It being GPL-3 licensed, with an exception that removed all of your rights). I don't plan on doing any integration with it, since that might just cause him to go after this addon.

Instead, I would suggest using my addon instead - it has most of the same features as the PetTracker addon, but is open source all the way: https://www.curseforge.com/wow/addons/battle-pet-completionist

commented

I don't plan on doing any integration with it, since that might just cause him to go after this addon.

I don't see how setting up a tooltip to be compatible with other addons (be it PetTracker or any other addon) would violate an addon's license (or non-license), or upset jaliborc or any other author. It's none of his business as you're not using any of his code.

But in the meantime, the issue is solved on my end anyway: I'm using my own code to integrate the pet source infos into the battle pet tooltip, and without conflicting with BattlePetCountNG (very simple, basically doing this). This means I could get rid of PetTracker for good, as I don't really need any of its other features 😁

However, thanks for the link to Battle Pet Completionist, I will give it a try if I feel the need for pet icons on the map.

And thanks for BattlePetCountNG, of course (and PasteNG too)!

– Tom

commented

You're welcome 🙂