|
Патчи на рассмотрении Рассматриваемые к принятию патчи |
|
Опции темы | Поиск в этой теме | Опции просмотра |
14.05.2012, 12:33 | #4 |
Ученый
Регистрация: 10.03.2010
Адрес: Бобруйск
Сообщений: 284
Сказал(а) спасибо: 213
Поблагодарили 98 раз(а) в 84 сообщениях
|
Возвращаемся к этому вопросу. Оказывается что, если взять предмет схожий с выше указанным, к примеру 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) |
Пользователь сказал cпасибо: | partizanes (15.05.2012) |
|
|
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
[11612] Cleanup codestyle in Item.cpp & Item.h | Den | Принятые патчи | 1 | 06.06.2011 11:46 |
[11227] Fixed item search by guid in bank item slots. | newsbot | CMaNGOS Commits | 0 | 06.03.2011 18:02 |
[10680] Update item buy code for new way vendor item lists work. | newsbot | CMaNGOS Commits | 0 | 04.11.2010 20:40 |
[10641] Fixed use item dynamic/item proto flags. | newsbot | CMaNGOS Commits | 0 | 25.10.2010 15:30 |
[9727] Build equiped item data only for item's owner | newsbot | CMaNGOS Commits | 0 | 11.04.2010 07:50 |