Quantcast WoWInterface - View Single Post - Missing Frames, Events and Functions in Battle For Azeroth
View Single Post
05-24-18, 07:40 AM   #32
A Theradrim Guardian
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 64
Originally Posted by Xrystal View Post
What is interesting is that the following code block
    GameTooltip:AddLine(IsHarmfulSpell(spellName) or "Helpful",1.0,1.0,1.0)
    GameTooltip:AddLine(IsHelpfulSpell(spellName) or "Harmful",1.0,1.0,1.0)
Resulted in Helpful in all cases except for the spells I didn't know/have in my spellbook, or were party specific spells - AKA Portals. Those returned both settings.
The logic in that block is literally reversed, but should not - i.e. "noharm" does not equate "help" nor vice versa.
Try this instead:
    GameTooltip:AddLine(IsHarmfulSpell(spellName) and "Harmful",1.0,1.0,1.0)
    GameTooltip:AddLine(IsHelpfulSpell(spellName) and "Helpful",1.0,1.0,1.0)
  Reply With Quote