From 51bcd1a918f6d0a908deb01051a07f63a7f0e9d6 Mon Sep 17 00:00:00 2001 From: Ovah Date: Sat, 9 Dec 2017 22:58:22 +0100 Subject: Core/Spells: Gathering no longer fails after patch 3.1.0 (#21039) * Core/Skills: gathering items with orange skill level will no longer fail as it has been removed with patch 3.1.0 Closes #21038 --- src/server/game/Spells/Spell.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 334e51eeb56..46f44c16744 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5340,12 +5340,6 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint if (ReqValue > skillValue) return SPELL_FAILED_LOW_CASTLEVEL; - // chance for fail at orange skinning attempt - if ((m_selfContainer && (*m_selfContainer) == this) && - skillValue < sWorld->GetConfigMaxSkillValue() && - (ReqValue < 0 ? 0 : ReqValue) > irand(skillValue - 25, skillValue + 37)) - return SPELL_FAILED_TRY_AGAIN; - break; } case SPELL_EFFECT_OPEN_LOCK: @@ -5400,13 +5394,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; + 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; } -- cgit v1.2.3