protected override void OnTick() { m_Count++; if (!m_Mobile.Alive) { this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } } // make sure the player has the right tool to damage the wall else if (m_bRepair == false && m_Wall.CanDamageWall(m_Mobile, m_Wall) == false) { // CanDamageWall already sent the player a message this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } } else { if (m_Mobile.Hidden) { m_Mobile.Hidden = false; } bool bHasMoved = false; if (m_Mobile.Location != m_MobLoc) { bHasMoved = true; } if (bHasMoved || m_Mobile.Map == Map.Internal) { if (m_bRepair) { m_Mobile.SendMessage("You move and stop repairing the wall."); } else { m_Mobile.SendMessage("You move and stop damaging the wall."); } this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } } else { if (m_Count > SECONDS_UNTIL_DONE || (Server.Misc.TestCenter.Enabled && m_Count > 10)) //1 minute to repair the wall { this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } m_Wall.EndWork(m_Mobile, m_bRepair, m_bFull); } else if (m_Count % 5 == 0) { if (m_bRepair) { m_Mobile.Emote("*repairs the wall*"); } else { // damage the Damagers waepon m_Wall.DamageWeapon(m_Mobile.Weapon as BaseWeapon); m_Mobile.Emote("*damages the wall*"); m_Mobile.CriminalAction(m_Mobile.Criminal == false); m_Wall.NotifyOfDamager(m_Mobile); } m_Mobile.Animate(11, 5, 1, true, false, 0); } } } }
protected override void OnTick() { m_Count++; if (!m_Mobile.Alive) { this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } } else { if (m_Mobile.Hidden) { m_Mobile.Hidden = false; } bool bHasMoved = false; if (m_Mobile.Location != m_MobLoc) { bHasMoved = true; } if (bHasMoved || m_Mobile.Map == Map.Internal) { if (m_bRepair) { m_Mobile.SendMessage("You move and stop repairing the wall."); } else { m_Mobile.SendMessage("You move and stop damaging the wall."); } this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } } else { if (m_Count > SECONDS_UNTIL_DONE || (Server.Misc.TestCenter.Enabled && m_Count > 10)) //1 minute to repair the wall { this.Stop(); if (m_bRepair) { m_Wall.CurrentRepairWorker = null; } else { m_Wall.CurrentDamageWorker = null; } m_Wall.EndRepair(m_Mobile, m_bRepair, m_bFull); } else if (m_Count % 5 == 0) { if (m_bRepair) { m_Mobile.Emote("*repairs the wall*"); } else { m_Mobile.Emote("*damages the wall*"); m_Wall.NotifyOfDamager(m_Mobile); } m_Mobile.Animate(11, 5, 1, true, false, 0); } } } }