Тема: Event stacking
Показать сообщение отдельно
Старый 23.11.2012, 04:22   #5
schmoozerd
MaNGOS Dev
 
Регистрация: 17.11.2011
Сообщений: 99
Сказал(а) спасибо: 35
Поблагодарили 80 раз(а) в 26 сообщениях
schmoozerd Скоро придёт к известности
По умолчанию

some observations:
the events are stacked for the triggered spell (64723)

The event-handling is this way: it is expected that the events are removed when the spells are finished casting.
as the triggered spells are channeled, and have infinity duration, they never finish casting. (so far so reasonable)

the problem is that the triggered channeled spells are cast triggered, and hence they are not "really" cast like channeled spells, and more important cannot be interrupted.

hence - even as there is only ever 1 triggered aura the triggered channeled spells stack up

possible that we should set triggered channeled spells to be set to be "finished" when they are cast, and then their events would get removed properly.

Edit
This will remove the triggered channeled spells instantly, however the channeled aura will not be removed, so it _might_ be possible that there are no serious side-effects!

Код:
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 7bfa06c..75e15d9 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3594,7 +3594,8 @@ void Spell::handle_immediate()
     // start channeling if applicable (after _handle_immediate_phase for get pe
     if (IsChanneledSpell(m_spellInfo) && m_duration)
     {
-        m_spellState = SPELL_STATE_CASTING;
+        if (!m_IsTriggeredSpell)
+            m_spellState = SPELL_STATE_CASTING;
         SendChannelStart(m_duration);
     }

Последний раз редактировалось schmoozerd; 23.11.2012 в 04:34.
schmoozerd вне форума   Ответить с цитированием