diff options
author | Ovah <dreadkiller@gmx.de> | 2017-12-09 22:58:22 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-12-09 22:58:22 +0100 |
commit | 51bcd1a918f6d0a908deb01051a07f63a7f0e9d6 (patch) | |
tree | 25ccf2f32abb0d5f591662cdfca503432e73d715 /src | |
parent | 2286da2166dda037f36a6cccfbafb7d5a6672369 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
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; } |