예제 #1
0
        public override void UpdateTab()
        {
            nudHealth.Value        = Hook.Health;
            nudHealthMax.Value     = Hook.HealthMax;
            nudHealthModMax.Value  = Hook.HealthModMax;
            nudStamina.Value       = Hook.Stamina;
            nudStaminaMax.Value    = Hook.StaminaMax;
            nudStaminaModMax.Value = Hook.StaminaModMax;
            nudChrType.Value       = Hook.ChrType;
            nudTeamType.Value      = Hook.TeamType;

            if (cbxForcePlayRegion.Checked)
            {
                Hook.PlayRegion = (int)nudPlayRegion.Value;
            }
            else
            {
                nudPlayRegion.Value = Hook.PlayRegion;
            }

            txtWorld.Text           = Hook.World.ToString();
            txtArea.Text            = Hook.Area.ToString();
            nudPosX.Value           = (decimal)Hook.PosX;
            nudPosY.Value           = (decimal)Hook.PosY;
            nudPosZ.Value           = (decimal)Hook.PosZ;
            nudPosAngle.Value       = (decimal)((Hook.PosAngle + Math.PI) / (Math.PI * 2) * 360);
            nudPosStableX.Value     = (decimal)Hook.PosStableX;
            nudPosStableY.Value     = (decimal)Hook.PosStableY;
            nudPosStableZ.Value     = (decimal)Hook.PosStableZ;
            nudPosStableAngle.Value = (decimal)((Hook.PosStableAngle + Math.PI) / (Math.PI * 2) * 360);

            cbxDeathCam.Checked = Hook.DeathCam;

            int bonfireID = Hook.LastBonfire;

            if (!cbxBonfire.DroppedDown && bonfireID != (cbxBonfire.SelectedItem as DSBonfire)?.ID)
            {
                DSBonfire result = cbxBonfire.Items.Cast <DSBonfire>().FirstOrDefault(b => b.ID == bonfireID);
                if (result == null)
                {
                    result = new DSBonfire(bonfireID, $"Unknown: {bonfireID}");
                    cbxBonfire.Items.Add(result);
                }
                cbxBonfire.SelectedItem = result;
            }

            // Backstabbing resets speed, so reapply it 24/7
            if (cbxSpeed.Checked)
            {
                Hook.SetSpeed((float)nudSpeed.Value);
            }
        }
예제 #2
0
        private void cbxBonfire_SelectedIndexChanged(object sender, EventArgs e)
        {
            DSBonfire bonfire = cbxBonfire.SelectedItem as DSBonfire;

            Hook.LastBonfire = bonfire.ID;
        }