/// <summary> /// Initializes a new instance of the <see cref="KinCityData"/> class. /// </summary> /// <param name="city">The city.</param> public KinCityData(KinFactionCities city) { this.m_City = city; this.m_CaptureTime = DateTime.Now; this.m_ControlingKin = IOBAlignment.None; this.m_GuardOption = GuardOptions.LordBritish; this.SetAllNPCFlags(); }
/// <summary> /// Initializes a new instance of the <see cref="KinCityData"/> class. /// </summary> /// <param name="reader">The reader.</param> public KinCityData(BinaryFileReader reader) { int version = reader.ReadInt(); switch (version) { case 2: { m_Treasury = reader.ReadInt(); m_TaxRate = reader.ReadDouble(); goto case 1; } case 1: { m_UnassignedGuardSlots = reader.ReadInt(); goto case 0; } case 0: { m_City = (KinFactionCities)reader.ReadInt(); m_ControlingKin = (IOBAlignment)reader.ReadInt(); m_CaptureTime = reader.ReadDeltaTime(); m_CityLeader = (PlayerMobile)reader.ReadMobile(); m_IsVotingStage = reader.ReadBool(); m_Sigil = (KinSigil)reader.ReadItem(); m_ControlPoints = reader.ReadInt(); m_ControlPointDelta = reader.ReadInt(); m_NPCFlags = (NPCFlags)reader.ReadInt(); m_GuardOption = (GuardOptions)reader.ReadInt(); m_LastGuardChangeTime = reader.ReadDeltaTime(); int length = reader.ReadInt(); if (length > 0) { for (int i = 0; i < length; ++i) { m_BeneficiaryDataList.Add(new BeneficiaryData(reader)); } } break; } } }
void ReadSettings() { Action = (ActionOptions)Settings.Default.Action; Guard = (GuardOptions)Settings.Default.Guard; Stand = (StandOptions)Settings.Default.Stand; CounterHit = (CounterHitOptions)Settings.Default.CounterHit; Stun = (StunOptions)Settings.Default.Stun; SAGauge = (SAGaugeOptions)Settings.Default.SAGauge; AttackData = (AttackDataOptions)Settings.Default.AttackData; InputDisplay = (InputDisplayOptions)Settings.Default.InputDisplay; LagSimulation = Settings.Default.LagSimulation; dgvPlayer1.Visible = (InputDisplay != InputDisplayOptions.Off); lblComboDamage.Visible = lblComboDamageT.Visible = lblLastDamage.Visible = lblLastDamageT.Visible = lblMaxCombo.Visible = lblMaxComboT.Visible /*= lblMaxDamage.Visible = lblMaxDamageT.Visible */ = (AttackData == AttackDataOptions.On); lblComboDamage.Text = "0 (0%)"; switch (InputDisplay) { case InputDisplayOptions.Off: dgvPlayer1.Rows.Clear(); dgvPlayer2.Rows.Clear(); formWidth = 180; break; case InputDisplayOptions.On: formWidth = 180; dgvPlayer2.Rows.Clear(); break; case InputDisplayOptions.Dual: formWidth = 360; break; } SetWindowPos(this.Handle, Game.Window, Game.WindowCoords.Left - formWidth, Game.WindowCoords.Top, formWidth, Game.WindowCoords.Height, SWP_SHOWWINDOW); if (AttackData == AttackDataOptions.On) { MaxDamage = 0; MaxComboLength = 0; P2HealthBeforeCurrentCombo = 160; DateTime LastComboEndedTime = DateTime.Now.AddDays(99); } KeyboardManager.LoadStateOnPlayback = Settings.Default.LoadStateOnPlayback; }