diff --git a/Source/GrasscutterTools/Forms/FormActivityEditor.cs b/Source/GrasscutterTools/Forms/FormActivityEditor.cs index d3884e7..f09d257 100644 --- a/Source/GrasscutterTools/Forms/FormActivityEditor.cs +++ b/Source/GrasscutterTools/Forms/FormActivityEditor.cs @@ -245,7 +245,7 @@ namespace GrasscutterTools.Forms { item.MeetCondList = TxtMeetCondList.Text.Split(',').Select(it => int.Parse(it.Trim())).ToList(); } - catch (Exception ex) + catch (Exception) { item.MeetCondList = new List(); } diff --git a/Source/GrasscutterTools/Forms/FormMain.cs b/Source/GrasscutterTools/Forms/FormMain.cs index b42f8ed..7798dc6 100644 --- a/Source/GrasscutterTools/Forms/FormMain.cs +++ b/Source/GrasscutterTools/Forms/FormMain.cs @@ -106,6 +106,7 @@ namespace GrasscutterTools.Forms CreatePage(); CreatePage(); CreatePage(); + CreatePage(); CreatePage(); //AddPageToGui(CreatePage("Tools")); TCMain.ResumeLayout(); @@ -134,6 +135,7 @@ namespace GrasscutterTools.Forms Resources.PageQuestTitle, Resources.PageSceneTitle, Resources.PageAchievementTitle, + "属性", Resources.PageAboutTitle, }); } diff --git a/Source/GrasscutterTools/Game/Props/PlayerProperty.cs b/Source/GrasscutterTools/Game/Props/PlayerProperty.cs new file mode 100644 index 0000000..affb4e4 --- /dev/null +++ b/Source/GrasscutterTools/Game/Props/PlayerProperty.cs @@ -0,0 +1,103 @@ +/** + * Grasscutter Tools + * Copyright (C) 2023 jie65535 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + **/ + +using System.Collections.Generic; + +namespace GrasscutterTools.Game.Props +{ + internal readonly struct PlayerProperty + { + public static List Values { get; } = new List { + new PlayerProperty("EXP", 0), + new PlayerProperty("BREAK_LEVEL"), + new PlayerProperty("SATIATION_VAL"), + new PlayerProperty("SATIATION_PENALTY_TIME"), + new PlayerProperty("LEVEL", 0, 90), + new PlayerProperty("LAST_CHANGE_AVATAR_TIME"), + new PlayerProperty("MAX_SPRING_VOLUME", 0, 8_500_000, + description: "Maximum volume of the Statue of the Seven for the player [0, 8500000]"), + new PlayerProperty("CUR_SPRING_VOLUME", true, + description: "Current volume of the Statue of the Seven [0, MAX_SPRING_VOLUME]"), + new PlayerProperty("IS_SPRING_AUTO_USE", 0, 1, + description: "Auto HP recovery when approaching the Statue of the Seven [0, 1]"), + new PlayerProperty("SPRING_AUTO_USE_PERCENT", 0, 100, + description: "Auto HP recovery percentage [0, 100]"), + new PlayerProperty("IS_FLYABLE", 0, 1, + description: "Are you in a state that disables your flying ability? e.g. new player [0, 1]"), + new PlayerProperty("IS_WEATHER_LOCKED", 0, 1), + new PlayerProperty("IS_GAME_TIME_LOCKED", 0, 1), + new PlayerProperty("IS_TRANSFERABLE", 0, 1), + new PlayerProperty("MAX_STAMINA", 0, 24_000, + description: "Maximum stamina of the player (0 - 24000)"), + new PlayerProperty("CUR_PERSIST_STAMINA", true, + description: "Used stamina of the player (0 - MAX_STAMINA)"), + new PlayerProperty("CUR_TEMPORARY_STAMINA"), + new PlayerProperty("PLAYER_LEVEL", 1, 60), + new PlayerProperty("PLAYER_EXP"), + new PlayerProperty("PLAYER_HCOIN", description: "Primogem (-inf, +inf)"), + // It is known that Mihoyo will make Primogem negative in the cases that a player spends + // his gems and then got a money refund, so negative is allowed. + new PlayerProperty("PLAYER_SCOIN", 0, description: "Mora [0, +inf)"), + new PlayerProperty("PLAYER_MP_SETTING_TYPE", 0, 2, + description: "Do you allow other players to join your game? [0=no 1=direct 2=approval]"), + new PlayerProperty("IS_MP_MODE_AVAILABLE", 0, 1, + description: "0 if in quest or something that disables MP [0, 1]"), + new PlayerProperty("PLAYER_WORLD_LEVEL", 0, 8, description: "[0, 8]"), + new PlayerProperty("PLAYER_RESIN", 0, 2000, + description: "Original Resin [0, 2000] - note that values above 160 require refills"), + new PlayerProperty("PLAYER_WAIT_SUB_HCOIN"), + new PlayerProperty("PLAYER_WAIT_SUB_SCOIN"), + new PlayerProperty("IS_ONLY_MP_WITH_PS_PLAYER", 0, 1, + description: "Is only MP with PlayStation players? [0, 1]"), + new PlayerProperty("PLAYER_MCOIN", description: "Genesis Crystal (-inf, +inf) see 10015"), + new PlayerProperty("PLAYER_WAIT_SUB_MCOIN"), + new PlayerProperty("PLAYER_LEGENDARY_KEY", 0), + new PlayerProperty("IS_HAS_FIRST_SHARE"), + new PlayerProperty("PLAYER_FORGE_POINT", 0, 300_000), + new PlayerProperty("CUR_CLIMATE_METER"), + new PlayerProperty("CUR_CLIMATE_TYPE"), + new PlayerProperty("CUR_CLIMATE_AREA_ID"), + new PlayerProperty("CUR_CLIMATE_AREA_CLIMATE_TYPE"), + new PlayerProperty("PLAYER_WORLD_LEVEL_LIMIT"), + new PlayerProperty("PLAYER_WORLD_LEVEL_ADJUST_CD"), + new PlayerProperty("PLAYER_LEGENDARY_DAILY_TASK_NUM"), + new PlayerProperty("PLAYER_HOME_COIN", 0, description: "Realm currency [0, +inf)"), + new PlayerProperty("PLAYER_WAIT_SUB_HOME_COIN") + }; + + public string Id { get; } + public int Min { get; } + public int Max { get; } + public bool DynamicRange { get; } + public string Description { get; } + + private PlayerProperty(string id, int min = int.MinValue, int max = int.MaxValue, bool dynamicRange = false, string description = "") + { + Id = id; + Min = min; + Max = max; + DynamicRange = dynamicRange; + Description = description; + } + + private PlayerProperty(string id, bool dynamicRange, string description = "") : this(id, int.MinValue, int.MaxValue, dynamicRange, description) + { + } + } +} \ No newline at end of file diff --git a/Source/GrasscutterTools/GrasscutterTools.csproj b/Source/GrasscutterTools/GrasscutterTools.csproj index 60b669a..8273e03 100644 --- a/Source/GrasscutterTools/GrasscutterTools.csproj +++ b/Source/GrasscutterTools/GrasscutterTools.csproj @@ -150,6 +150,7 @@ + @@ -245,6 +246,12 @@ PageScene.cs + + UserControl + + + PageSetProp.cs + UserControl @@ -454,6 +461,7 @@ PageHome.cs + Designer PageHome.cs @@ -524,6 +532,12 @@ PageScene.cs + + PageSetProp.cs + + + PageSetProp.cs + PageSpawn.cs diff --git a/Source/GrasscutterTools/Pages/PageSetProp.Designer.cs b/Source/GrasscutterTools/Pages/PageSetProp.Designer.cs new file mode 100644 index 0000000..7fc6ca8 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageSetProp.Designer.cs @@ -0,0 +1,357 @@ +namespace GrasscutterTools.Pages +{ + partial class PageSetProp + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PageSetProp)); + this.LblWorldLevel = new System.Windows.Forms.Label(); + this.NUDWorldLevel = new System.Windows.Forms.NumericUpDown(); + this.LblBPLevel = new System.Windows.Forms.Label(); + this.NUDBPLevel = new System.Windows.Forms.NumericUpDown(); + this.LblTowerLevel = new System.Windows.Forms.Label(); + this.NUDTowerLevel = new System.Windows.Forms.NumericUpDown(); + this.LblGodMode = new System.Windows.Forms.Label(); + this.LblUnlimitedStamina = new System.Windows.Forms.Label(); + this.LblUnlimitedEnergy = new System.Windows.Forms.Label(); + this.LblOpenState = new System.Windows.Forms.Label(); + this.BtnGodModeOn = new System.Windows.Forms.Button(); + this.BtnGodModeOff = new System.Windows.Forms.Button(); + this.BtnUnlimitedStaminaOn = new System.Windows.Forms.Button(); + this.BtnUnlimitedStaminaOff = new System.Windows.Forms.Button(); + this.BtnUnlimitedEnergyOn = new System.Windows.Forms.Button(); + this.BtnUnlimitedEnergyOff = new System.Windows.Forms.Button(); + this.BtnSetOpenState = new System.Windows.Forms.Button(); + this.BtnUnsetOpenState = new System.Windows.Forms.Button(); + this.BtnUnlockMap = new System.Windows.Forms.Button(); + this.NUDOpenStateValue = new System.Windows.Forms.NumericUpDown(); + this.LblSetPropTitle = new System.Windows.Forms.Label(); + this.LblPlayerProperty = new System.Windows.Forms.Label(); + this.CmbPlayerProperty = new System.Windows.Forms.ComboBox(); + this.NUDPlayerPropertyValue = new System.Windows.Forms.NumericUpDown(); + this.BtnPlayerPropertyOff = new System.Windows.Forms.Button(); + this.BtnPlayerPropertyOn = new System.Windows.Forms.Button(); + this.LblPlayerPropertyDesc = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.NUDWorldLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDBPLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDTowerLevel)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDOpenStateValue)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDPlayerPropertyValue)).BeginInit(); + this.SuspendLayout(); + // + // LblWorldLevel + // + resources.ApplyResources(this.LblWorldLevel, "LblWorldLevel"); + this.LblWorldLevel.Name = "LblWorldLevel"; + // + // NUDWorldLevel + // + resources.ApplyResources(this.NUDWorldLevel, "NUDWorldLevel"); + this.NUDWorldLevel.Maximum = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.NUDWorldLevel.Name = "NUDWorldLevel"; + this.NUDWorldLevel.Value = new decimal(new int[] { + 8, + 0, + 0, + 0}); + this.NUDWorldLevel.ValueChanged += new System.EventHandler(this.NUDWorldLevel_ValueChanged); + this.NUDWorldLevel.Click += new System.EventHandler(this.NUDWorldLevel_ValueChanged); + // + // LblBPLevel + // + resources.ApplyResources(this.LblBPLevel, "LblBPLevel"); + this.LblBPLevel.Name = "LblBPLevel"; + // + // NUDBPLevel + // + resources.ApplyResources(this.NUDBPLevel, "NUDBPLevel"); + this.NUDBPLevel.Maximum = new decimal(new int[] { + 12, + 0, + 0, + 0}); + this.NUDBPLevel.Name = "NUDBPLevel"; + this.NUDBPLevel.Value = new decimal(new int[] { + 12, + 0, + 0, + 0}); + this.NUDBPLevel.ValueChanged += new System.EventHandler(this.NUDBPLevel_ValueChanged); + this.NUDBPLevel.Click += new System.EventHandler(this.NUDBPLevel_ValueChanged); + // + // LblTowerLevel + // + resources.ApplyResources(this.LblTowerLevel, "LblTowerLevel"); + this.LblTowerLevel.Name = "LblTowerLevel"; + // + // NUDTowerLevel + // + resources.ApplyResources(this.NUDTowerLevel, "NUDTowerLevel"); + this.NUDTowerLevel.Maximum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUDTowerLevel.Name = "NUDTowerLevel"; + this.NUDTowerLevel.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.NUDTowerLevel.ValueChanged += new System.EventHandler(this.NUDTowerLevel_ValueChanged); + this.NUDTowerLevel.Click += new System.EventHandler(this.NUDTowerLevel_ValueChanged); + // + // LblGodMode + // + resources.ApplyResources(this.LblGodMode, "LblGodMode"); + this.LblGodMode.Name = "LblGodMode"; + // + // LblUnlimitedStamina + // + resources.ApplyResources(this.LblUnlimitedStamina, "LblUnlimitedStamina"); + this.LblUnlimitedStamina.Name = "LblUnlimitedStamina"; + // + // LblUnlimitedEnergy + // + resources.ApplyResources(this.LblUnlimitedEnergy, "LblUnlimitedEnergy"); + this.LblUnlimitedEnergy.Name = "LblUnlimitedEnergy"; + // + // LblOpenState + // + resources.ApplyResources(this.LblOpenState, "LblOpenState"); + this.LblOpenState.Name = "LblOpenState"; + // + // BtnGodModeOn + // + resources.ApplyResources(this.BtnGodModeOn, "BtnGodModeOn"); + this.BtnGodModeOn.Name = "BtnGodModeOn"; + this.BtnGodModeOn.Tag = "godmode on"; + this.BtnGodModeOn.UseVisualStyleBackColor = true; + this.BtnGodModeOn.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnGodModeOff + // + resources.ApplyResources(this.BtnGodModeOff, "BtnGodModeOff"); + this.BtnGodModeOff.Name = "BtnGodModeOff"; + this.BtnGodModeOff.Tag = "godmode off"; + this.BtnGodModeOff.UseVisualStyleBackColor = true; + this.BtnGodModeOff.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnUnlimitedStaminaOn + // + resources.ApplyResources(this.BtnUnlimitedStaminaOn, "BtnUnlimitedStaminaOn"); + this.BtnUnlimitedStaminaOn.Name = "BtnUnlimitedStaminaOn"; + this.BtnUnlimitedStaminaOn.Tag = "unlimitedstamina on"; + this.BtnUnlimitedStaminaOn.UseVisualStyleBackColor = true; + this.BtnUnlimitedStaminaOn.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnUnlimitedStaminaOff + // + resources.ApplyResources(this.BtnUnlimitedStaminaOff, "BtnUnlimitedStaminaOff"); + this.BtnUnlimitedStaminaOff.Name = "BtnUnlimitedStaminaOff"; + this.BtnUnlimitedStaminaOff.Tag = "unlimitedstamina off"; + this.BtnUnlimitedStaminaOff.UseVisualStyleBackColor = true; + this.BtnUnlimitedStaminaOff.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnUnlimitedEnergyOn + // + resources.ApplyResources(this.BtnUnlimitedEnergyOn, "BtnUnlimitedEnergyOn"); + this.BtnUnlimitedEnergyOn.Name = "BtnUnlimitedEnergyOn"; + this.BtnUnlimitedEnergyOn.Tag = "unlimitedenergy on"; + this.BtnUnlimitedEnergyOn.UseVisualStyleBackColor = true; + this.BtnUnlimitedEnergyOn.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnUnlimitedEnergyOff + // + resources.ApplyResources(this.BtnUnlimitedEnergyOff, "BtnUnlimitedEnergyOff"); + this.BtnUnlimitedEnergyOff.Name = "BtnUnlimitedEnergyOff"; + this.BtnUnlimitedEnergyOff.Tag = "unlimitedenergy off"; + this.BtnUnlimitedEnergyOff.UseVisualStyleBackColor = true; + this.BtnUnlimitedEnergyOff.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // BtnSetOpenState + // + resources.ApplyResources(this.BtnSetOpenState, "BtnSetOpenState"); + this.BtnSetOpenState.Name = "BtnSetOpenState"; + this.BtnSetOpenState.UseVisualStyleBackColor = true; + this.BtnSetOpenState.Click += new System.EventHandler(this.BtnSetOpenState_Click); + // + // BtnUnsetOpenState + // + resources.ApplyResources(this.BtnUnsetOpenState, "BtnUnsetOpenState"); + this.BtnUnsetOpenState.Name = "BtnUnsetOpenState"; + this.BtnUnsetOpenState.UseVisualStyleBackColor = true; + this.BtnUnsetOpenState.Click += new System.EventHandler(this.BtnUnsetOpenState_Click); + // + // BtnUnlockMap + // + resources.ApplyResources(this.BtnUnlockMap, "BtnUnlockMap"); + this.BtnUnlockMap.Name = "BtnUnlockMap"; + this.BtnUnlockMap.Tag = "unlockmap on"; + this.BtnUnlockMap.UseVisualStyleBackColor = true; + this.BtnUnlockMap.Click += new System.EventHandler(this.BtnSetPropButton_Click); + // + // NUDOpenStateValue + // + resources.ApplyResources(this.NUDOpenStateValue, "NUDOpenStateValue"); + this.NUDOpenStateValue.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDOpenStateValue.Name = "NUDOpenStateValue"; + // + // LblSetPropTitle + // + resources.ApplyResources(this.LblSetPropTitle, "LblSetPropTitle"); + this.LblSetPropTitle.Name = "LblSetPropTitle"; + // + // LblPlayerProperty + // + resources.ApplyResources(this.LblPlayerProperty, "LblPlayerProperty"); + this.LblPlayerProperty.Name = "LblPlayerProperty"; + // + // CmbPlayerProperty + // + this.CmbPlayerProperty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.CmbPlayerProperty.FormattingEnabled = true; + resources.ApplyResources(this.CmbPlayerProperty, "CmbPlayerProperty"); + this.CmbPlayerProperty.Name = "CmbPlayerProperty"; + this.CmbPlayerProperty.SelectedIndexChanged += new System.EventHandler(this.CmbPlayerProperty_SelectedIndexChanged); + // + // NUDPlayerPropertyValue + // + resources.ApplyResources(this.NUDPlayerPropertyValue, "NUDPlayerPropertyValue"); + this.NUDPlayerPropertyValue.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.NUDPlayerPropertyValue.Name = "NUDPlayerPropertyValue"; + this.NUDPlayerPropertyValue.ValueChanged += new System.EventHandler(this.NUDPlayerPropertyValue_ValueChanged); + this.NUDPlayerPropertyValue.Click += new System.EventHandler(this.NUDPlayerPropertyValue_ValueChanged); + // + // BtnPlayerPropertyOff + // + resources.ApplyResources(this.BtnPlayerPropertyOff, "BtnPlayerPropertyOff"); + this.BtnPlayerPropertyOff.Name = "BtnPlayerPropertyOff"; + this.BtnPlayerPropertyOff.Tag = "off"; + this.BtnPlayerPropertyOff.UseVisualStyleBackColor = true; + this.BtnPlayerPropertyOff.Click += new System.EventHandler(this.BtnPlayerPropertyButton_Click); + // + // BtnPlayerPropertyOn + // + resources.ApplyResources(this.BtnPlayerPropertyOn, "BtnPlayerPropertyOn"); + this.BtnPlayerPropertyOn.Name = "BtnPlayerPropertyOn"; + this.BtnPlayerPropertyOn.Tag = "on"; + this.BtnPlayerPropertyOn.UseVisualStyleBackColor = true; + this.BtnPlayerPropertyOn.Click += new System.EventHandler(this.BtnPlayerPropertyButton_Click); + // + // LblPlayerPropertyDesc + // + resources.ApplyResources(this.LblPlayerPropertyDesc, "LblPlayerPropertyDesc"); + this.LblPlayerPropertyDesc.AutoEllipsis = true; + this.LblPlayerPropertyDesc.ForeColor = System.Drawing.SystemColors.GrayText; + this.LblPlayerPropertyDesc.Name = "LblPlayerPropertyDesc"; + // + // PageSetProp + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.LblPlayerPropertyDesc); + this.Controls.Add(this.BtnPlayerPropertyOff); + this.Controls.Add(this.BtnPlayerPropertyOn); + this.Controls.Add(this.NUDPlayerPropertyValue); + this.Controls.Add(this.CmbPlayerProperty); + this.Controls.Add(this.LblPlayerProperty); + this.Controls.Add(this.LblSetPropTitle); + this.Controls.Add(this.NUDOpenStateValue); + this.Controls.Add(this.BtnUnlockMap); + this.Controls.Add(this.BtnUnsetOpenState); + this.Controls.Add(this.BtnSetOpenState); + this.Controls.Add(this.BtnUnlimitedEnergyOff); + this.Controls.Add(this.BtnUnlimitedEnergyOn); + this.Controls.Add(this.BtnUnlimitedStaminaOff); + this.Controls.Add(this.BtnUnlimitedStaminaOn); + this.Controls.Add(this.BtnGodModeOff); + this.Controls.Add(this.BtnGodModeOn); + this.Controls.Add(this.LblOpenState); + this.Controls.Add(this.LblUnlimitedEnergy); + this.Controls.Add(this.LblUnlimitedStamina); + this.Controls.Add(this.LblGodMode); + this.Controls.Add(this.NUDTowerLevel); + this.Controls.Add(this.LblTowerLevel); + this.Controls.Add(this.NUDBPLevel); + this.Controls.Add(this.LblBPLevel); + this.Controls.Add(this.NUDWorldLevel); + this.Controls.Add(this.LblWorldLevel); + this.Name = "PageSetProp"; + ((System.ComponentModel.ISupportInitialize)(this.NUDWorldLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDBPLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDTowerLevel)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDOpenStateValue)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NUDPlayerPropertyValue)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label LblWorldLevel; + private System.Windows.Forms.NumericUpDown NUDWorldLevel; + private System.Windows.Forms.Label LblBPLevel; + private System.Windows.Forms.NumericUpDown NUDBPLevel; + private System.Windows.Forms.Label LblTowerLevel; + private System.Windows.Forms.NumericUpDown NUDTowerLevel; + private System.Windows.Forms.Label LblGodMode; + private System.Windows.Forms.Label LblUnlimitedStamina; + private System.Windows.Forms.Label LblUnlimitedEnergy; + private System.Windows.Forms.Label LblOpenState; + private System.Windows.Forms.Button BtnGodModeOn; + private System.Windows.Forms.Button BtnGodModeOff; + private System.Windows.Forms.Button BtnUnlimitedStaminaOn; + private System.Windows.Forms.Button BtnUnlimitedStaminaOff; + private System.Windows.Forms.Button BtnUnlimitedEnergyOn; + private System.Windows.Forms.Button BtnUnlimitedEnergyOff; + private System.Windows.Forms.Button BtnSetOpenState; + private System.Windows.Forms.Button BtnUnsetOpenState; + private System.Windows.Forms.Button BtnUnlockMap; + private System.Windows.Forms.NumericUpDown NUDOpenStateValue; + private System.Windows.Forms.Label LblSetPropTitle; + private System.Windows.Forms.Label LblPlayerProperty; + private System.Windows.Forms.ComboBox CmbPlayerProperty; + private System.Windows.Forms.NumericUpDown NUDPlayerPropertyValue; + private System.Windows.Forms.Button BtnPlayerPropertyOff; + private System.Windows.Forms.Button BtnPlayerPropertyOn; + private System.Windows.Forms.Label LblPlayerPropertyDesc; + } +} diff --git a/Source/GrasscutterTools/Pages/PageSetProp.cs b/Source/GrasscutterTools/Pages/PageSetProp.cs new file mode 100644 index 0000000..7bdd582 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageSetProp.cs @@ -0,0 +1,77 @@ +using System; +using System.Globalization; +using System.Windows.Forms; +using GrasscutterTools.Game.Props; + +namespace GrasscutterTools.Pages +{ + internal partial class PageSetProp : BasePage + { + private const string SetPropPrefix = "/setProp"; + + public PageSetProp() + { + InitializeComponent(); + } + + public override void OnLoad() + { + CmbPlayerProperty.DataSource = PlayerProperty.Values; + CmbPlayerProperty.DisplayMember = "Id"; + } + + private void NUDWorldLevel_ValueChanged(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, "worldlevel " + NUDWorldLevel.Value); + } + + private void NUDBPLevel_ValueChanged(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, "bplevel " + NUDBPLevel.Value); + } + + private void NUDTowerLevel_ValueChanged(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, "towerlevel " + NUDTowerLevel.Value); + } + + private void BtnSetPropButton_Click(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, (sender as Button).Tag as string); + } + + private void BtnSetOpenState_Click(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, "setopenstate " + NUDOpenStateValue.Value); + } + + private void BtnUnsetOpenState_Click(object sender, EventArgs e) + { + SetCommand(SetPropPrefix, "unsetopenstate " + NUDOpenStateValue.Value); + } + + private void NUDPlayerPropertyValue_ValueChanged(object sender, EventArgs e) + { + if (CmbPlayerProperty.SelectedIndex == -1) + return; + SetCommand(SetPropPrefix, CmbPlayerProperty.Text.ToLower(CultureInfo.CurrentCulture) + " " + NUDPlayerPropertyValue.Value); + } + + private void BtnPlayerPropertyButton_Click(object sender, EventArgs e) + { + if (CmbPlayerProperty.SelectedIndex == -1) + return; + SetCommand(SetPropPrefix, CmbPlayerProperty.Text.ToLower(CultureInfo.CurrentCulture) + " " + (sender as Button).Tag); + } + + private void CmbPlayerProperty_SelectedIndexChanged(object sender, EventArgs e) + { + if (CmbPlayerProperty.SelectedIndex == -1) + return; + var selectedItem = (PlayerProperty)CmbPlayerProperty.SelectedItem; + NUDPlayerPropertyValue.Maximum = selectedItem.Max; + NUDPlayerPropertyValue.Minimum = selectedItem.Min; + LblPlayerPropertyDesc.Text = selectedItem.Description; + } + } +} diff --git a/Source/GrasscutterTools/Pages/PageSetProp.resx b/Source/GrasscutterTools/Pages/PageSetProp.resx new file mode 100644 index 0000000..596baa4 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageSetProp.resx @@ -0,0 +1,801 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + 99, 39 + + + 56, 17 + + + 0 + + + 世界等级 + + + LblWorldLevel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 26 + + + 161, 37 + + + 70, 23 + + + 1 + + + NUDWorldLevel + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 25 + + + True + + + 99, 68 + + + 56, 17 + + + 2 + + + 深渊螺旋 + + + LblBPLevel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 24 + + + 161, 66 + + + 70, 23 + + + 3 + + + NUDBPLevel + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 23 + + + True + + + 99, 97 + + + 56, 17 + + + 4 + + + 纪行等级 + + + LblTowerLevel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 22 + + + 161, 95 + + + 70, 23 + + + 5 + + + NUDTowerLevel + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 21 + + + True + + + 342, 38 + + + 56, 17 + + + 6 + + + 无敌模式 + + + LblGodMode + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 20 + + + True + + + 342, 67 + + + 56, 17 + + + 7 + + + 无限体力 + + + LblUnlimitedStamina + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 19 + + + True + + + 342, 96 + + + 56, 17 + + + 8 + + + 无限能量 + + + LblUnlimitedEnergy + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 18 + + + True + + + 82, 127 + + + 73, 17 + + + 9 + + + Open State + + + LblOpenState + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 17 + + + 404, 35 + + + 75, 23 + + + 10 + + + + + + BtnGodModeOn + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 16 + + + 485, 35 + + + 75, 23 + + + 11 + + + + + + BtnGodModeOff + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 15 + + + 404, 64 + + + 75, 23 + + + 12 + + + + + + BtnUnlimitedStaminaOn + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 14 + + + 485, 64 + + + 75, 23 + + + 13 + + + + + + BtnUnlimitedStaminaOff + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + 404, 93 + + + 75, 23 + + + 14 + + + + + + BtnUnlimitedEnergyOn + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + + + 485, 93 + + + 75, 23 + + + 15 + + + + + + BtnUnlimitedEnergyOff + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 11 + + + 242, 124 + + + 75, 23 + + + 18 + + + 设置 + + + BtnSetOpenState + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + 323, 124 + + + 75, 23 + + + 19 + + + 取消 + + + BtnUnsetOpenState + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + 404, 122 + + + 156, 23 + + + 16 + + + 点亮地图 + + + BtnUnlockMap + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + 161, 124 + + + 70, 23 + + + 17 + + + NUDOpenStateValue + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + True + + + 6, 6 + + + 80, 17 + + + 0 + + + 设置账号属性 + + + LblSetPropTitle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + 99, 184 + + + 56, 17 + + + 20 + + + 玩家属性 + + + LblPlayerProperty + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + 161, 181 + + + 237, 25 + + + 21 + + + CmbPlayerProperty + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 404, 182 + + + 120, 23 + + + 22 + + + NUDPlayerPropertyValue + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + + NoControl + + + 242, 212 + + + 75, 23 + + + 24 + + + + + + BtnPlayerPropertyOff + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + NoControl + + + 161, 212 + + + 75, 23 + + + 23 + + + + + + BtnPlayerPropertyOn + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + Top, Left, Right + + + NoControl + + + 161, 160 + + + 474, 21 + + + 25 + + + LblPlayerPropertyDesc + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 7, 17 + + + PageSetProp + + + GrasscutterTools.Pages.BasePage, GrasscutterTools, Version=1.9.0.0, Culture=neutral, PublicKeyToken=de2b1c089621e923 + + \ No newline at end of file diff --git a/Source/GrasscutterTools/Pages/PageSetProp.zh-TW.resx b/Source/GrasscutterTools/Pages/PageSetProp.zh-TW.resx new file mode 100644 index 0000000..bc22586 --- /dev/null +++ b/Source/GrasscutterTools/Pages/PageSetProp.zh-TW.resx @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 世界等級 + + + 深淵螺旋 + + + 紀行等級 + + + 無敵模式 + + + 無限體力 + + + 無限能量 + + + 設定 + + + 點亮地圖 + + + + 80, 17 + + + 設定帳號屬性 + + \ No newline at end of file