Core/Spell: define channels without movement interrupt flags as allowed move
- Remove script hacks no longer needed (cherry picked from commit 3a0cb90ea994e82dd8c70888fb847082f738d5dc)
This commit is contained in:
@@ -1675,7 +1675,7 @@ bool SpellInfo::IsChanneled() const
|
||||
|
||||
bool SpellInfo::IsMoveAllowedChannel() const
|
||||
{
|
||||
return IsChanneled() && HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING);
|
||||
return IsChanneled() && (HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) || (!(ChannelInterruptFlags[0] & (AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING))));
|
||||
}
|
||||
|
||||
bool SpellInfo::NeedsComboPoints() const
|
||||
|
||||
@@ -1129,10 +1129,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
if (me->GetDistance(victim) < 15.0f && !victim->HasAura(SPELL_SHADOW_RESONANCE_RESIST, me->GetGUID()))
|
||||
{
|
||||
DoCast(victim, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
else
|
||||
MoveInLineOfSight(me->GetVictim());
|
||||
}
|
||||
@@ -1146,7 +1143,6 @@ class npc_dark_nucleus : public CreatureScript
|
||||
}
|
||||
|
||||
DoCast(who, SPELL_SHADOW_RESONANCE_RESIST);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* attacker, uint32& /*damage*/) override
|
||||
|
||||
@@ -933,7 +933,6 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
|
||||
|
||||
void StartAttack()
|
||||
{
|
||||
GetCaster()->ClearUnitState(UNIT_STATE_CASTING);
|
||||
GetCaster()->DeleteThreatList();
|
||||
GetCaster()->ToCreature()->AI()->AttackStart(GetHitUnit());
|
||||
GetCaster()->AddThreat(GetHitUnit(), 500000000.0f); // value seen in sniff
|
||||
|
||||
@@ -725,7 +725,6 @@ class boss_the_lich_king : public CreatureScript
|
||||
summon->CastSpell(summon, SPELL_ICE_SPHERE, false);
|
||||
summon->CastSpell(summon, SPELL_ICE_BURST_TARGET_SEARCH, false);
|
||||
summon->CastSpell(target, SPELL_ICE_PULSE, false);
|
||||
summon->ClearUnitState(UNIT_STATE_CASTING);
|
||||
summon->GetMotionMaster()->MoveFollow(target, 0.0f, 0.0f);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -161,7 +161,6 @@ public:
|
||||
break;
|
||||
case EVENT_RESUME_PULSING_SHOCKWAVE:
|
||||
DoCast(me, SPELL_PULSING_SHOCKWAVE_AURA, true);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING); // This flag breaks movement.
|
||||
DoCast(me, SPELL_PULSING_SHOCKWAVE, true);
|
||||
break;
|
||||
case EVENT_INTRO_DIALOGUE:
|
||||
|
||||
@@ -230,8 +230,6 @@ class boss_kologarn : public CreatureScript
|
||||
summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_PERIODIC, true);
|
||||
summon->CastSpell(summon, SPELL_FOCUSED_EYEBEAM_VISUAL, true);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
// One of the above spells is a channeled spell, we need to clear this unit state for MoveChase to work
|
||||
summon->ClearUnitState(UNIT_STATE_CASTING);
|
||||
|
||||
// Victim gets 67351
|
||||
if (!eyebeamTarget.IsEmpty())
|
||||
|
||||
@@ -1304,7 +1304,6 @@ class npc_mimiron_assault_bot : public CreatureScript
|
||||
{
|
||||
case EVENT_MAGNETIC_FIELD:
|
||||
DoCastVictim(SPELL_MAGNETIC_FIELD);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
events.RescheduleEvent(EVENT_MAGNETIC_FIELD, 30000);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -2305,7 +2305,6 @@ class spell_illidan_find_target : public SpellScriptLoader
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
{
|
||||
caster->CastSpell(target, SPELL_PARALYZE, true);
|
||||
caster->ClearUnitState(UNIT_STATE_CASTING);
|
||||
caster->AI()->SetGUID(target->GetGUID(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user