Core/MovementGenerators: Don't remove evade state when clearing unit states.
Core/Spells: Don't start combat when the target is evading. Closes issue 1861 --HG-- branch : trunk
This commit is contained in:
@@ -54,7 +54,7 @@ HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner)
|
||||
|
||||
uint32 travel_time = i_destinationHolder.SetDestination(traveller, x, y, z);
|
||||
modifyTravelTime(travel_time);
|
||||
owner.clearUnitState(UNIT_STAT_ALL_STATE);
|
||||
owner.clearUnitState(UNIT_STAT_ALL_STATE & ~UNIT_STAT_EVADE);
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -1321,7 +1321,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_caster && !m_caster->IsFriendlyTo(unit) && !IsPositiveSpell(m_spellInfo->Id))
|
||||
if (missInfo != SPELL_MISS_EVADE && m_caster && !m_caster->IsFriendlyTo(unit) && !IsPositiveSpell(m_spellInfo->Id))
|
||||
{
|
||||
m_caster->CombatStart(unit, !(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_NO_INITIAL_AGGRO));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user