Jump to content

[patch] Extend Go-Scripts for Fishingholes


Recommended Posts

What bug does the patch fix? What features does the patch add?

Allows to use assigned scripts to GO-Fishinghole

(these GOs are actually never used, but their looting is done on use of Fishingnode and a range-search for suitable pool)

This is only used yet (afaik) for the lurker below, but hardcoding its entry, chance, (perhaps Instance-State?) is I think worse then put all these things to SD2

For which repository revision was the patch created?


Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.


Who has been writing this patch? Please include either forum user names or email addresses.


diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index c05e963..838b9e2 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1136,7 +1136,10 @@ void GameObject::Use(Unit* user)
                        GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE);
                        if (ok)
-                            player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE);
+                            // If a script assigned, then use its !result to give loot
+                            if (!Script->GOHello(player, ok))
+                                player->SendLoot(ok->GetGUID(),LOOT_FISHINGHOLE);
                            player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_FISH_IN_GAMEOBJECT, ok->GetGOInfo()->id);


Further use for the Lurker Below:

* Assign SD2 Script to the GO Strange Pool

* put there a go hello script, which has a chance to summon the lurker, else return false

* summoning lurker with spell

Link to comment
Share on other sites

Even so, you miss the whole idea about processing GO's per type. Instead you want to add some hack where you feel it's needed, which in my opinion will not benefit either yourself, me, the users or the learning process and understanding of the code.

Rejected, alternative code will be made instead, that will not break with the current way of processing GO's per type.


Link to comment
Share on other sites

Not going to hit anyone more than usual.

My point was: when someone spend time in finding a bug/a limit/a missing feature, we all should expect that they already study the existing code and already know how similar parts of our ways work.

I bonk Schmoo in the head every other day though, and i'm pretty sure he didn't get so hurt that he's not able to continue the good work he already do, although sometimes with a weird code. As a side note to that, he also point out my weird things when he find them (which i expect people to do, this is how things are improved) :)

Link to comment
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use