Fixes npc not chasing, Also fixes auras not being applied.

This commit is contained in:
hondacrx
2021-10-13 18:12:24 -04:00
parent ae0899efd8
commit b759f6204f
3 changed files with 3 additions and 3 deletions
@@ -126,7 +126,7 @@ namespace Game.Movement
// if the target moved, we have to consider whether to adjust
if (_lastTargetPosition != target.GetPosition() || mutualChase != _mutualChase)
{
_lastTargetPosition = target.GetPosition();
_lastTargetPosition.Relocate(target.GetPosition());
_mutualChase = mutualChase;
if (owner.HasUnitState(UnitState.ChaseMove) || !PositionOkay(owner, target, minRange, maxRange, angle))
{
+1 -1
View File
@@ -2736,7 +2736,7 @@ namespace Game.Spells
// only valid for non-area auras
foreach (var spellEffectInfo in GetSpellInfo().GetEffects())
{
if ((effMask & (1u << (int)spellEffectInfo.EffectIndex)) != 0 && spellEffectInfo.IsEffect(SpellEffectName.ApplyAura))
if ((effMask & (1u << (int)spellEffectInfo.EffectIndex)) != 0 && !spellEffectInfo.IsEffect(SpellEffectName.ApplyAura))
effMask &= ~(1u << (int)spellEffectInfo.EffectIndex);
}
+1 -1
View File
@@ -2050,7 +2050,7 @@ namespace Game.Spells
if (!m_spellValue.Duration.HasValue)
{
hitInfo.AuraDuration *= caster.ModSpellDuration(m_spellInfo, unit, hitInfo.AuraDuration, hitInfo.Positive, spellAura.GetEffectMask());
hitInfo.AuraDuration = caster.ModSpellDuration(m_spellInfo, unit, hitInfo.AuraDuration, hitInfo.Positive, spellAura.GetEffectMask());
if (hitInfo.AuraDuration > 0)
{