WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   Hide party quest information in Raids (https://www.wowinterface.com/forums/showthread.php?t=54576)

Tonyleila 10-01-16 08:06 AM

Hide party quest information in Raids
 
So the new Raid is out and everyone has this 2 quest objectives to loot something from the boss and they will have this quest for month! Turns out that it displays both quest objectives for more then 10 players in the tooltip so that it covers half of my screen when I mouseover the boss.
Coud someone creat and addon to hide or shorten the quest from other players shown in the tooltip? Best woud be if it only shows my 2 Quests since I can check if others have it in the questlog if I want.



The AddOn shown here is TipTac but its the same problem with the default tooltip.

Kanegasi 10-01-16 01:20 PM

/console showQuestTrackingTooltips 0

Tonyleila 10-01-16 06:13 PM

Quote:

Originally Posted by Kanegasi (Post 319573)
/console showQuestTrackingTooltips 0

LOL its that easy! Thanks :D

Tonyleila 10-04-16 04:48 AM

Quote:

Originally Posted by Kanegasi (Post 319573)
/console showQuestTrackingTooltips 0

So its all nice but it somehow sucks to use 2 macros to enable/disable this in/outside raids.
If someone creates an AddOn out of this that enables this when you join a raid group and disables it when you leave I woud be very happy ;) :D

MysticalOS 10-04-16 09:57 PM

I'm adding this into DBM built in. when boss pulled it'll toggle off and when fight over toggle on. Just another annoying thing to add to list to hide on combat start.

Tonyleila 10-05-16 04:20 AM

Quote:

Originally Posted by MysticalOS (Post 319682)
I'm adding this into DBM built in. when boss pulled it'll toggle off and when fight over toggle on. Just another annoying thing to add to list to hide on combat start.


That sounds great. But I have been using BigWigs for 10 years and don't realy want to switch :D
Maybe there is a chance you also release it as an extra AddOn :p

pas06 10-05-16 05:24 AM

i am not very good at this, but wouldn't something like this work?
Code:

f=CreateFrame("Frame")
f:RegisterEvent("PLAYER_ENTERING_WORLD ")
f:SetScript("OnEvent",function(self,event)
local _,instanceType = GetInstanceInfo()

        if instanceType == "raid" then
                SetCVar(showQuestTrackingTooltips, 0)
        else
                SetCVar(showQuestTrackingTooltips, 1)
        end
end)

-- should work in (raid) instances
or
Code:

f=CreateFrame("Frame")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:SetScript("OnEvent",function(self,event)
        if IsInRaid() then
                SetCVar(showQuestTrackingTooltips, 0)
        else
                SetCVar(showQuestTrackingTooltips, 1)
        end
end)

--should work in the world when in a raid
please correct me if i am wrong

Phanx 10-06-16 12:42 AM

Either of those should generally work, but the name of the CVar is a string, so it needs to be quoted:
Code:

SetCVar("showQuestTrackingTooltips", 1)
Without quotes, you're passing SetCVar a variable name, but since there is (probably) no variable with that name, SetCVar will either throw an error, or just ignore you.

Also, "f" should be a local variable (put a "local" keyword at the beginning of the first line). Putting "f" into the global namespace is just begging for conflicts -- and if Blizzard ever leaks a global "f" you could potentially break the whole UI, which actually happened with "_" when Cataclysm launched.

Finally, you can shorten things up a bit with ternary syntax. ;)

Code:

local f = CreateFrame("Frame")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:SetScript("OnEvent", function(self, event)
        SetCVar("showQuestTrackingTooltips", IsInRaid() and 0 or 1)
end)


Resike 10-06-16 01:20 PM

Quote:

Originally Posted by Phanx (Post 319703)
Either of those should generally work, but the name of the CVar is a string, so it needs to be quoted:
Code:

SetCVar("showQuestTrackingTooltips", 1)
Without quotes, you're passing SetCVar a variable name, but since there is (probably) no variable with that name, SetCVar will either throw an error, or just ignore you.

Also, "f" should be a local variable (put a "local" keyword at the beginning of the first line). Putting "f" into the global namespace is just begging for conflicts -- and if Blizzard ever leaks a global "f" you could potentially break the whole UI, which actually happened with "_" when Cataclysm launched.

Finally, you can shorten things up a bit with ternary syntax. ;)

Code:

local f = CreateFrame("Frame")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:SetScript("OnEvent", function(self, event)
        SetCVar("showQuestTrackingTooltips", IsInRaid() and 0 or 1)
end)


Since you can't set cvars in combat, you should also make sure to have a combat lockdown check.

Tonyleila 10-06-16 03:35 PM

Quote:

Originally Posted by Resike (Post 319716)
Since you can't set cvars in combat, you should also make sure to have a combat lockdown check.


pas06 10-07-16 10:24 AM

so something like this?
Code:

local f=CreateFrame("Frame")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:SetScript("OnEvent",function(self,event)
        if (event == "GROUP_ROSTER_UPDATE") then
                if InCombatLockdown() then
                        f:RegisterEvent("PLAYER_REGEN_ENABLED")
                else
                        SetCVar("showQuestTrackingTooltips", IsInRaid() and 0 or 1)
                end
        else
                SetCVar("showQuestTrackingTooltips", IsInRaid() and 0 or 1)
                f:UnregisterEvent("PLAYER_REGEN_ENABLED")
        end
end)


gmarco 10-07-16 10:11 PM

Hi,
could it be written in this way ?

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:SetScript("OnEvent", function(self, event, ...)
  3.     if IsInRaid() then
  4.         if event == "PLAYER_REGEN_DISABLED" then
  5.             SetCVar( "showQuestTrackingTooltips", "0", true )
  6.         elseif event == "PLAYER_REGEN_ENABLED" then    
  7.             SetCVar( "showQuestTrackingTooltips", "1", true )
  8.         end
  9.     end
  10. end)
  11. f:RegisterEvent("PLAYER_REGEN_DISABLED")
  12. f:RegisterEvent("PLAYER_REGEN_ENABLED")


This should works but I have not to be removed from the raid in combat :) or my quests will not be tracking anymore (till next reload ? :)


Thanks.

Phanx 10-08-16 02:00 AM

Quote:

Originally Posted by Resike (Post 319716)
Since you can't set cvars in combat, you should also make sure to have a combat lockdown check.

No. That is completely wrong. :mad: :(

I really wish you would stop posting things without first checking that they are true. This has never been true, and would have taken you less than 30 seconds to test.

Proof:
/run local v, t, n = "showQuestTrackingTooltips", 1.5, 0 local function f() n = n + 1 SetCVar(v, n % 2 == 0 and 1 or 0) print(n, "-", GetCVar(v)) C_Timer.After(t, f) end C_Timer.After(t, f)
Type that, press Enter, go get in combat. Observe that it keeps counting up every 1.5 seconds, reporting the CVar value as having been successfully changed each time, and no errors are occurring.

To anyone else reading this thread, the code in my previous post in this thread works fine. You do not need to check for combat.

Quote:

Originally Posted by gmarco (Post 319768)
Hi,
could it be written in this way ?

Yes, but written that way it would toggle the CVar based on whether or not you were in combat, not whether or not you were in a raid. Also, since you still check for raid status, whatever state you were in when you left a raid group -- quest info shown, or not shown -- would "stick" until the next time you entered or left combat after joining another raid group, which probably isn't the intention.

gmarco 10-08-16 03:33 AM

Quote:

Yes, but written that way it would toggle the CVar based on whether or not you were in combat, not whether or not you were in a raid. Also, since you still check for raid status, whatever state you were in when you left a raid group -- quest info shown, or not shown -- would "stick" until the next time you entered or left combat after joining another raid group, which probably isn't the intention.
My code start from the info that you should be not in combat to set the CVAR and on my idea that you can't be kicked or leave the group in combat (WRONG :)


So now, reading again (and understanding better) your code I think it is a so simple and elegant solution.

Lua Code:
  1. local f = CreateFrame("Frame")
  2. f:RegisterEvent("GROUP_ROSTER_UPDATE")
  3. f:SetScript("OnEvent", function(self, event)
  4.     SetCVar("showQuestTrackingTooltips", IsInRaid() and 0 or 1)
  5. end)

Thanks (as usual) :)

Tonyleila 10-19-16 08:48 AM

1 Attachment(s)
Thank you all for your help! Its working fine and I'm not shure yet if its worth an upload but I'll link it here for easy access first:


All times are GMT -6. The time now is 07:04 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI