Core/Spells: Prevent rerolling gathering skillups until success when mining or gathering herbs

Port From (https://github.com/TrinityCore/TrinityCore/commit/dce71612efa11bad7f25c65962d455843bd79baf)
This commit is contained in:
hondacrx
2023-09-14 04:30:42 -04:00
parent da4c05aad3
commit a862056cc4
+4 -2
View File
@@ -1309,9 +1309,11 @@ namespace Game.Spells
if (gameObjTarget != null) if (gameObjTarget != null)
{ {
// Allow one skill-up until respawned // Allow one skill-up until respawned
if (!gameObjTarget.IsInSkillupList(player.GetGUID()) && if (!gameObjTarget.IsInSkillupList(player.GetGUID()))
player.UpdateGatherSkill(skillId, pureSkillValue, (uint)reqSkillValue, 1, gameObjTarget)) {
player.UpdateGatherSkill((uint)skillId, pureSkillValue, (uint)reqSkillValue, 1, gameObjTarget);
gameObjTarget.AddToSkillupList(player.GetGUID()); gameObjTarget.AddToSkillupList(player.GetGUID());
}
} }
else if (itemTarget != null) else if (itemTarget != null)
{ {