private void CheckTether() { // Check if pet is past hard tether range, if so, despawn it // right away. if (!Body.IsWithinRadius(Owner, m_hardTether)) { if (m_tetherTimer != null) { m_tetherTimer.Stop(); } (Body as NecromancerPet).CutTether(); return; } // Check if pet is out of soft tether range. if (!Body.IsWithinRadius(Owner, m_softTether)) { if (m_tetherTimer == null) { // Pet just went out of range, start the timer. m_tetherTimer = new TetherTimer(Body as NecromancerPet); m_tetherTimer.Start(1); } } else { if (m_tetherTimer != null) { // Pet is back in range, stop the timer. m_tetherTimer.Stop(); m_tetherTimer = null; SetTetherTimer(-1); } } }
private void CheckTether() { // Check if pet is past hard tether range, if so, despawn it // right away. if (!Body.IsWithinRadius(Owner, m_hardTether)) { if (m_tetherTimer != null) m_tetherTimer.Stop(); (Body as NecromancerPet).CutTether(); return; } // Check if pet is out of soft tether range. if (!Body.IsWithinRadius(Owner, m_softTether)) { if (m_tetherTimer == null) { // Pet just went out of range, start the timer. m_tetherTimer = new TetherTimer(Body as NecromancerPet); m_tetherTimer.Start(1); } } else { if (m_tetherTimer != null) { // Pet is back in range, stop the timer. m_tetherTimer.Stop(); m_tetherTimer = null; SetTetherTimer(-1); } } }