Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Принятые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=5)
-   -   [patch] Check cast Killing Spree (http://mangos.ytdb.ru/showthread.php?t=6327)

Den 12.10.2012 16:08

[patch] Check cast Killing Spree
 
Код:

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 913f942..b6da6c1 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5447,6 +5447,19 @@ SpellCastResult Spell::CheckCast(bool strict)
                    if (m_caster->IsInWater())
                        return SPELL_FAILED_ONLY_ABOVEWATER;
                }
+                else if (m_spellInfo->Id == 51690)          // Killing Spree
+                {
+                    UnitList targets;
+
+                    float radius = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
+
+                    MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck unitCheck(m_caster, m_caster, radius);
+                    MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyVisibleUnitInObjectRangeCheck> checker(targets, unitCheck);
+                    Cell::VisitAllObjects(m_caster, checker, radius);
+
+                    if (targets.empty())
+                        return SPELL_FAILED_OUT_OF_RANGE;
+                }
                else if (m_spellInfo->SpellIconID == 156)  // Holy Shock
                {
                    // spell different for friends and enemies


schmoozerd 21.05.2013 17:53

In [12509]. Thank you.


Текущее время: 12:30. Часовой пояс GMT +3.

ru-mangos.ru - Русское сообщество MaNGOS