Fix For Quest Red Snapper - Very Tasty

Patch Title: Fix for quest 9452 Red Snapper - Very Tasty
What bug does this patch fix: Currently when you use the item provided by the questgiver nothing happens, this fixes that issue. http://sourceforge.n...arcemu/ticket/6
Detailed Explanation: Replaced the existing class (Hackfix?) with a function that hopefully is the correct way to do it.
How to reproduce: Take quest 9452 from NPC 17101 and try to use the item provided.

pSpell can't be NULL if we are handling its dummy effect. All calls to sScriptMgr.CallScriptedDummySpell(uint32 uSpellId, uint32 i, Spell* pSpell) have "this" as pSpell. there's no point checking if u_caster (type Unit) is a Player when Spell has p_caster(type Player).
- ln 37

if(pPlayer->GetMapMgr() == NULL)

not in-world Objects can NOT cast spells, so casters will ALWAYS be in world. This check is totally useless and makes the reader think that casters can be not in world at times.
- ln 45

School->Despawn(600, 0);

what's the point of despawning the school after 600 ms and no respawning it anymore?

The despawn timer is 600 because from my own experience and according to multiple comments on wowhead you are able to cast the net 2 maybe 3 times on the same school if you are lucky. The respawn timer is just a guess I'm afraid.

Edit:

I updated the main post with a patch that can be applied to the latest revision of arcemu, also moved the spellhandler to where it should be and added some documentation of the function to keep up with the standards.

In my case, the 2 targets have guid 5 and 17370383762768003120: 5 is (clearly) the Player, the other one is the GameObject. If you set a breakpoint in CastFishingNet(), you'll notice it will be called twice, the first time pSpell->gameObjTarget will be NULL and pSpell->playerTarget will be p_caster, the second time you'll notice pSpell->gameObjTarget is a reference to a GameObject with pInfo set to {ID=181616 Type=8 DisplayID=6883 ...} which has the same ID of your GetGameObjectNearestCoords() call. This means you shouldn't get the GameObject with GetGameObjectNearestCoords() but check instead if pSpell->gameObjTarget is NULL, if it's not check its ID (dunno if at this point of the code is required, you could figure it on your own ) and use it in your code.

This post looks more like a flour scoop than a spoon, I hope you wont get an indigestion.