diff options
author | SnapperRy <snapperryen@gmail.com> | 2016-09-12 19:37:24 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-26 19:21:19 +0100 |
commit | 83257dacf24ddd94669e0ae997b9850cd6c6238e (patch) | |
tree | 7e597b09d6324da89910928656954d29d45c86ca /src | |
parent | bf3570dadb28a792e6c1d329b821ff9878c11593 (diff) |
Core/Fishing: ignore required skill when fishing in pools.
(cherry picked from commit 4164e0cf88745a85b5b11587471b047fe0077fbb)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 0aa37080ce6..47391d8a6bb 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1525,8 +1525,12 @@ void GameObject::Use(Unit* user) player->UpdateFishingSkill(); - // but you will likely cause junk in areas that require a high fishing skill - if (chance >= roll) + /// @todo find reasonable value for fishing hole search + GameObject* fishingPool = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE); + + // If fishing skill is high enough, or if fishing on a pool, send correct loot. + // Fishing pools have no skill requirement as of patch 3.3.0 (undocumented change). + if (chance >= roll || fishingPool) { /// @todo I do not understand this hack. Need some explanation. // prevent removing GO at spell cancel @@ -1534,17 +1538,15 @@ void GameObject::Use(Unit* user) SetOwnerGUID(player->GetGUID()); SetSpellId(0); // prevent removing unintended auras at Unit::RemoveGameObject - /// @todo find reasonable value for fishing hole search - GameObject* ok = LookupFishingHoleAround(20.0f + CONTACT_DISTANCE); - if (ok) + if (fishingPool) { - ok->Use(player); + fishingPool->Use(player); SetLootState(GO_JUST_DEACTIVATED); } else player->SendLoot(GetGUID(), LOOT_FISHING); } - else // else: junk + else // If fishing skill is too low, send junk loot. player->SendLoot(GetGUID(), LOOT_FISHING_JUNK); break; } |