Возвращаемся к этому вопросу. Оказывается что, если взять предмет схожий с выше указанным, к примеру
http://www.wowhead.com/item=4360 то получается, что на цель 34 уровня предмет не действует вообще. Выходит так, на каждый уровень по 10% снимается шанс, что предмет будет использован.
We come back to this question. It appears that if to take a subject similar with above specified, for example
http://www.wowhead.com/item=4360 that turns out that 34 levels the subject doesn't affect the purpose in general. Leaves so, on each level on 10 % the chance acts in film that the subject will be used.
Код:
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index bfc115d..01098dd 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4919,6 +4919,31 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_CASTER_AURASTATE;
}
+ // Sleep (item 3434)
+ if (m_spellInfo->Id == 700)
+ {
+ int32 targetLevel = m_targets.getUnitTarget()->GetLevel();
+ float chance = m_spellInfo->procChance;
+
+ switch (targetLevel)
+ {
+ case 31: chance = 90.0f; break;
+ case 32: chance = 80.0f; break;
+ case 33: chance = 70.0f; break;
+ case 34: chance = 60.0f; break;
+ case 35: chance = 50.0f; break;
+ case 36: chance = 40.0f; break;
+ case 37: chance = 30.0f; break;
+ case 38: chance = 20.0f; break;
+ case 39: chance = 10.0f; break;
+ }
+
+ if (!roll_chance_i(chance) || targetLevel >= 40)
+ return SPELL_FAILED_FIZZLE;
+
+ return SPELL_CAST_OK;
+ }
+
// totem immunity for channeled spells(needs to be before spell cast)
// spell attribs for player channeled spells
if (m_spellInfo->HasAttribute(SPELL_ATTR_EX_UNK14)
PS Попробовал перевести переводчиком обратно этот же текст на русский, последнее предложение