mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 08:00:48 +01:00
Core/Spells: Gathering no longer fails after patch 3.1.0
By Ovahlord
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user