Fishing: "wow, that is a big one!" #117


  • Accepted
Open
  • rismisner created this issue Jul 12, 2010
    Owner

    Taken from mojothejojo's comment on the curse download page (with commentary to follow)

    i cant find the event for looting the fish after fishing.
    there is only the event for starting channeling fishin. but at this moment i doesnt fit to say "wow, that is a big one!"

    hope u understood ^^

  • rismisner added the tags Accepted Enhancment Jul 12, 2010
  • rismisner posted a comment Jul 12, 2010

    IIRC there is an event hook in the API that I can use to detect looting as the primary basis of this feature, so it is technically feasible, but that event hook API is generic for all looting, so it also would occur when looting a dungeon boss for example.

    There are two potential approaches I see to isolate it to fishing

    1) Identify the specific item that was looted, and announce looting a fish-type item. This approach would present the challenge of creating and maintaining a list of all valid item IDs of fish-type items, or "big fish" in particular. Perhaps limited to those types of fish that can be equipped in your off-hand weapon slot?

    I have thus far been very careful to avoid creating or maintaining specific lists of item IDs or spell IDs, in order to keep SS as generic and flexible as possible. Many other ideas however would also rely on more specific support for specific kinds of events that are not that generic, thus I need to figure out what common themes exist between these different feature requsts, in order to establish a framework for growth in the direction (as opposed to an increasing list of special cases, which always become increasingly difficult to maintain).

    2) Identify the act of looting any item while fishing. This would require setting a state flag variable to remember that we recently cast the fishing spell, in order to identify that the next loot received is fish. This approach would assume that any loot that is looted immediately after fishing, including trash like [tangled fishing line] would be valid for announcing "wow, that is a big one!"

    This approach poses a problem where, suppose you cancel your last cast of fishing, and it leaves this flag set that says "the next loot received is fish" ... you then join a raid, and upon looting your first kill in the raid, you announce "wow, that is a big one!" ... because that was your first loot received after casting fishing. The problem being that casting fishing, or beginning to channel fishing, does not guarantee that you will loot anything, in order to clear that flag to set "the next loot received is fish"=false.

    This approach #2 would achieve the intended results for, say, 95% maybe 99% accuracy, but that last set of edge cases would be extremely difficult to codify and maintain properly. Perhaps 95% accuracy is good enough?

    I think this feature is a great idea, so I don't want to decline it. I put it on the list here because it would be fun to have. However, it may be a while before I implement it, given my unanswered questions about the technical nature of exactly how it should work.

  • rismisner posted a comment Jul 12, 2010

    In generic SS event hook style, I wonder if this could be done based on approach 1, for a user-selected item list?

    I dunno... but this is a really excellent example idea that does wonders to challenge my design of event keys (a concept internal to SS) which is really helpful in itself in my effort to design something better than that, in order to approach an event hook creation method that is more like MSBT.

  • _ForgeUser228323 posted a comment Jul 30, 2010

    After using the LOOT_OPENED event, IsFishingLoot() will return true if it was obtained by fishing, false otherwise. Then, you can loop through the loop slots and use GetLootSlotInfo(slot). If at least one quality > 0, then you got something worthwhile. If the 9th variable GetItemInfo returns is "INVTYPE_HOLDABLE", then you know you got something big. :)

  • rismisner posted a comment Aug 10, 2010

    Awesome! It's totally do-able then!

  • rismisner removed their assignment Jan 16, 2013
  • rismisner assigned issue to _ForgeUser228323 Jan 16, 2013
  • rismisner posted a comment Jan 16, 2013

    I'm re-assigning all my tickets to Duerma

  • rismisner unassigned issue from _ForgeUser228323 May 7, 2015
  • rismisner posted a comment May 7, 2015

    Unassigning tickets that are not actively being worked on

  • rismisner posted a comment May 9, 2017

    This is related to a more generic suggestion for gathering professions discussed here:

    https://www.wowace.com/projects/speakinspell/issues/193


    Edited May 9, 2017

To post a comment, please login or register a new account.