WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Hiding Time Played (https://www.wowinterface.com/forums/showthread.php?t=44890)

Moxie 10-22-12 03:08 PM

Hiding Time Played
 
I'm looking for a way to hide the time played message every time that I log in, as Altoholic already keeps track of that for me and doesn't find it necessary to print to chat.

I've searched for TIME_PLAYED_TOTAL to see if I have a mod that is doing it and came up empty, but I'm unsure as to how to go about hiding the message entirely using that same string.

Any help would be super.

Seerah 10-22-12 03:12 PM

It must be a mod that is doing it... I don't ever recall seeing that message without having to type /played.

You may need to do a binary search.

lerb 10-22-12 03:31 PM

Notepad++ has a search function built in that lets you search multiple files, or even folders iirc. Just open it up, press ctrl+f, hit the "search in files" tab and enter search criteria.

Moxie 10-22-12 03:37 PM

I've disabled and re-enabled mod by mod and searched using Notepad++ before posting, but it's still happening. Not sure where it's coming from, but it's annoying and I'd like to hide it permanently.

Moxie 10-22-12 05:11 PM

Figured out how to hide it, since I couldn't find which mod was doing it.

SDPhantom 10-22-12 05:32 PM

It's Altoholic doing it to update its records of how long you've played on a character.

Moxie 10-22-12 05:37 PM

It never did it before (unless I can't remember changing the code myself) and I checked the code to see where it says to print, but it's hidden now anyway. :)

Phanx 10-22-12 06:51 PM

Search your addon files for "RequestTimePlayed", which is the function that gets that information. Any addon calling that function to update its records should also hide it when it wasn't requested by the user. Here are the relevant bits from Broker_PlayedTime; feel free to point the author of Altoholic at this thread for copypasta.

Code:

local requesting

local o = ChatFrame_DisplayTimePlayed
ChatFrame_DisplayTimePlayed = function(...)
        if requesting then
                requesting = false
                return
        end
        return o(...)
end

function addon:RequestTimePlayed()
        requesting = true
        RequestTimePlayed()
end

function addon:TIME_PLAYED_MSG(timePlayed)
        -- do something with the timePlayed here
end


SDPhantom 10-22-12 07:58 PM

Quote:

Originally Posted by Decabah (Post 267404)
It never did it before (unless I can't remember changing the code myself) and I checked the code to see where it says to print, but it's hidden now anyway. :)

When you open the interface options, go to the AddOns tab, open the DataStore category and select DataStore_Characters. In there is the option, "Request play time at login." This is the option that is producing the messages and is required for Altoholic to keep track of your character's play time.


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

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI