protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } else if (m_From.NetState == null || m_From.Alive || m_From.Deleted || m_Target.Deleted || !m_From.InRange(m_Target, m_Range) || GhostHelper.SameArea(m_From, m_Target) == false) { m_Arrow.Stop(); Stop(); if (!m_From.Alive) { GhostHelper.OnGhostWalking(m_From); } return; } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } else if (m_From.NetState == null || !(SpecialAbilities.Exists(m_From)) || !(SpecialAbilities.Exists(m_Target)) || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range) || (m_Target.AccessLevel > m_From.AccessLevel)) { m_Arrow.Stop(); Stop(); if (m_From != null) { m_From.SendLocalizedMessage(503177); // You have lost your quarry. } return; } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } else if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range)) { m_From.Send(new CancelArrow()); m_From.SendLocalizedMessage(503177); // You have lost your quarry. Tracking.ClearTrackingInfo(m_From); Stop(); return; } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(m_LastX, m_LastY); } }
protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } else { if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || (m_Range != -1 && !m_From.InRange(m_Target, m_Range)) || (m_Target is Mobile && ((Mobile)m_Target).Hidden && ((Mobile)m_Target).AccessLevel > m_From.AccessLevel)) { m_Arrow.Stop(); Stop(); return; } } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { m_From.CloseGump(typeof(TrackDistanceGump)); if (!m_Arrow.Running) { Stop(); return; } else if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range)) { m_Arrow.Stop(); Stop(); return; } else { m_From.SendGump(new TrackDistanceGump(m_From, m_Target)); } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { if (!_Arrow.Running) { Stop(); return; } if (_Owner.NetState == null || _Owner.Deleted || _Target.Deleted || _Owner.Map != _Target.Map || (_Range != -1 && !_Owner.InRange(_Target, _Range)) || (_Target is Mobile && ((Mobile)_Target).Hidden && ((Mobile)_Target).AccessLevel > _Owner.AccessLevel)) { _Arrow.Stop(); Stop(); return; } if (_LastX == _Target.X && _LastY == _Target.Y) { return; } _LastX = _Target.X; _LastY = _Target.Y; _Arrow.Update(); }
protected override void OnTick() { if (!m_Arrow.Running) { if (m_From is PlayerMobile) { ((PlayerMobile)m_From).EndPlayerAction(); } Stop(); return; } if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range) || (m_Target.Hidden && m_Target.AccessLevel > m_From.AccessLevel)) { m_Arrow.Stop(); Stop(); return; } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { if (RegionTracking) { m_newDistance = Math.Max(Math.Abs(m_Target.Location.Y - m_From.Location.Y), Math.Abs(m_Target.Location.X - m_From.Location.X)); } if (!m_Arrow.Running) { Stop(); return; } if (m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || RegionTracking && m_Target is Mobile mt && m_From.TopRegion != mt.TopRegion && Math.Abs(m_LastDistance - m_newDistance) > 20 || !RegionTracking && !m_From.InRange(m_Target, m_Range) || m_Target is Mobile m && m.Hidden && m.AccessLevel > AccessLevel.Player) { if (!KeepMarkerOnRangeLost) { m_Arrow.Stop(); } Stop(); m_From.SendLocalizedMessage(503177); // You have lost your quarry. return; } if (p_LastX != m_From.Location.X || p_LastY != m_From.Location.Y || m_LastX != m_Target.Location.X || m_LastY != m_Target.Location.Y) { m_LastX = m_Target.Location.X; m_LastY = m_Target.Location.Y; p_LastX = m_From.Location.X; p_LastY = m_From.Location.Y; if (RegionTracking) { m_LastDistance = m_newDistance; } m_Arrow.Update(); } }
protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } else if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range)) { m_Arrow.Stop(); Stop(); return; } if (m_LastX != m_Target.X || m_LastY != m_Target.Y) { m_LastX = m_Target.X; m_LastY = m_Target.Y; m_Arrow.Update(); } }
protected override void OnTick() { if (!m_Arrow.Running) { Stop(); return; } if (m_From.NetState == null || m_From.Deleted || m_Target.Deleted || m_From.Map != m_Target.Map || !m_From.InRange(m_Target, m_Range) || m_Target is Mobile m && m.Hidden && m.AccessLevel > m_From.AccessLevel) { m_Arrow.Stop(); Stop(); return; } if (m_LastX != m_Target.Location.X || m_LastY != m_Target.Location.Y) { m_LastX = m_Target.Location.X; m_LastY = m_Target.Location.Y; m_Arrow.Update(); } }