Thread Tools Display Modes
09-12-12, 06:36 PM   #1
diocode
A Defias Bandit
Join Date: Nov 2010
Posts: 3
TheLimnogist Acheivement

How do I find an event that determines whether or not a character is fishing?

I've found the following:

if( IsFishingLoot() ) then
PlaySound("FISHING REEL IN");
LootFramePortraitOverlay:SetTexture("Interface\\LootFrame\\FishingLoot-Icon");
end

Is that the best way? What I'm trying to do is determine if a fish that is caught will be in the Limnologist Achievement. For a test I made a toc file like this:

## Interface: 50001
## Title: TheLimnologist
## Author: Mike Hoy
## Dependencies:
## OptDeps:
## SavedVariables:

TheLimnologist.lua


and the lua file:

TheLimnologist.lua:

if ( IsFishingLoot() ) then
print("Test")
end


I checked into it further and tried to find an event that I can listen for and then run the if statement but I'm not finding anything. Also the "Test" does not show up in the chat window when the loot window comes up after fishing.
  Reply With Quote
09-12-12, 06:38 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
LOOT_OPENED fires when you open a loot window, and LOOT_CLOSED fires when you close it.

See also:
http://www.wowpedia.org/Events/Loot#LOOT_CLOSED
http://www.wowpedia.org/World_of_War...Loot_Functions
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
09-12-12, 10:40 PM   #3
diocode
A Defias Bandit
Join Date: Nov 2010
Posts: 3
Originally Posted by Phanx View Post
LOOT_OPENED fires when you open a loot window, and LOOT_CLOSED fires when you close it.

See also:
http://www.wowpedia.org/Events/Loot#LOOT_CLOSED
http://www.wowpedia.org/World_of_War...Loot_Functions
Thanks for the help.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » TheLimnogist Acheivement


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