Core/Spells: Gathering no longer fails after patch 3.1.0

By Ovahlord
This commit is contained in:
Aokromes
2017-12-10 12:28:04 +01:00
parent 2c1e4d9b90
commit 4d455eaedb
4 changed files with 3 additions and 3 deletions

View File

@@ -5530,13 +5530,13 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
if (res != SPELL_CAST_OK)
return res;
// chance for fail at orange mining/herb/LockPicking gathering attempt
// chance for fail at LockPicking attempt
// second check prevent fail at rechecks
if (skillId != SKILL_NONE && (!m_selfContainer || ((*m_selfContainer) != this)))
{
bool canFailAtMax = skillId != SKILL_HERBALISM && skillId != SKILL_MINING && skillId != SKILL_ARCHAEOLOGY;
bool canFailAtMax = skillId == SKILL_LOCKPICKING;
// chance for failure in orange gather / lockpick (gathering skill can't fail at maxskill)
// chance for failure in orange lockpick
if ((canFailAtMax && skillValue < sWorld->GetConfigMaxSkillValue()) && reqSkillValue > irand(skillValue - 25, skillValue + 37))
return SPELL_FAILED_TRY_AGAIN;
}