Thread Tools Display Modes
03-07-15, 01:01 PM   #1
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
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?
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
03-07-15, 01:56 PM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
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.
  Reply With Quote
03-07-15, 01:59 PM   #3
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Is that tracking quest a daily thing though? If so then I think it's the best solution I could ask for
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
03-07-15, 02:10 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
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.
  Reply With Quote
03-07-15, 02:14 PM   #5
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Well, that's the hack to magically solve all my problems then. Thanks!
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Detect when the player is mining/ herbing?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off