WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Detect when the player is mining/ herbing? (https://www.wowinterface.com/forums/showthread.php?t=52055)

Malsomnus 03-07-15 01:01 PM

Detect when the player is mining/ herbing?
 
My add-on absolutely needs to also remind players if they haven't been to their garrison's mine/ herb garden yet today, and I figure that the best I can actually do is detect when the player has done some mining/ herbing (yes, it is a verb) while inside the garrison zone.
The best way I came up with is checking the combat log to see when the player finishes casting the mine/ herb spell and then disabling the reminder for this toon on this date, but I'm sure that as usual there's probably a better way that hasn't occurred to me, so... does anyone know how I could improve the above idea? :)

semlar 03-07-15 01:56 PM

It marks a tracking quest as complete the first time you mine or herb in your garrison, for me it was quest 36799 which you can check via IsQuestFlaggedCompleted(36799).

I think it only completes one regardless of what you loot, because I didn't see a separate quest when I struck a mining node after herbing.

Malsomnus 03-07-15 01:59 PM

Is that tracking quest a daily thing though? If so then I think it's the best solution I could ask for :p

semlar 03-07-15 02:10 PM

It's a daily, it should tell you whether a character has looted an herb or mining node in their garrison when they log in.

Malsomnus 03-07-15 02:14 PM

Well, that's the hack to magically solve all my problems then. Thanks!


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

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