fix(Core): Correct Post 3.1 Fishing Skill Leveling (#12996)

This commit is contained in:
ZhengPeiRu21
2022-09-18 19:09:47 -06:00
committed by GitHub
parent c0ac3431ff
commit 25f88caa42
3 changed files with 22 additions and 2 deletions

View File

@@ -1744,11 +1744,13 @@ void GameObject::Use(Unit* user)
LOG_DEBUG("entities.gameobject", "Fishing check (skill: {} zone min skill: {} chance {} roll: {}", skill, zone_skill, chance, roll);
if (sScriptMgr->OnUpdateFishingSkill(player, skill, zone_skill, chance, roll))
{
player->UpdateFishingSkill();
}
// but you will likely cause junk in areas that require a high fishing skill (not yet implemented)
if (chance >= roll)
{
player->UpdateFishingSkill();
//TODO: I do not understand this hack. Need some explanation.
// prevent removing GO at spell cancel
RemoveFromOwner();