All pastes #21597 Raw Edit

fds

public text v1 · immutable
#21597 ·published 2005-08-30 14:34 UTC
rendered paste body
		private void AlarmTimer_Tick(object sender, EventArgs e)
		{
			alarmstarttime--;
			UpdateTitle(alarmstarttime, totallooted, fishingtime);

			if (alarmstarttime == 0)
			{
				AlarmTimer.Stop();
				UpdateTitle(alarmstarttime, totallooted, fishingtime);

				this.btnAlarmStart.Enabled = true;
				this.btnAlarmStop.Enabled = false;

				// hearthstone to INN then logout
				if (cbAlarmHearthstone.Checked)
				{
					foreach (WoW_Object item in wow.Inventory.GetAllItems())
					{
						if (item == null)
							continue;

						if (item.Name == "Hearthstone")
						{
							wow.Inventory.UseItem(item.Name);

							while (wow.Player.IsCasting)
							{
							}

							wow.SendScript("Logout()");
							return;
						}
					}

					// we shouldn't get here if the above was checked
					wow.SendScript("Logout()");
				}
			}
		}