mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
Revert "feat: VisitFriends can be toggled off"
This reverts commit 37d92becca.
This commit is contained in:
@@ -35,15 +35,6 @@ bool asst::MallTask::set_params(const json::value& params)
|
||||
{
|
||||
LogTraceFunction;
|
||||
|
||||
bool visitFriends = params.get("visit_friends", true);
|
||||
|
||||
if (!visitFriends) {
|
||||
m_visit_task_ptr->set_enable(false);
|
||||
}
|
||||
else {
|
||||
m_visit_task_ptr->set_enable(true);
|
||||
}
|
||||
|
||||
bool shopping = params.get("shopping", true);
|
||||
|
||||
if (shopping) {
|
||||
|
||||
@@ -133,7 +133,6 @@ namespace MaaWpfGui.Constants
|
||||
public const string RecruitChooseLevel4 = "AutoRecruit.ChooseLevel4";
|
||||
public const string RecruitChooseLevel5 = "AutoRecruit.ChooseLevel5";
|
||||
|
||||
public const string CreditVisitFriends = "Mall.CreditVisitFriends";
|
||||
public const string CreditShopping = "Mall.CreditShopping";
|
||||
public const string CreditFirstListNew = "Mall.CreditFirstListNew";
|
||||
public const string CreditBlackListNew = "Mall.CreditBlackListNew";
|
||||
|
||||
@@ -1833,7 +1833,6 @@ namespace MaaWpfGui.Main
|
||||
/// </summary>
|
||||
/// <param name="creditFight">是否信用战斗。</param>
|
||||
/// <param name="selectFormation">信用战斗选择编队</param>
|
||||
/// <param name="visitFriends">是否访问好友。</param>
|
||||
/// <param name="withShopping">是否购物。</param>
|
||||
/// <param name="firstList">优先购买列表。</param>
|
||||
/// <param name="blacklist">黑名单列表。</param>
|
||||
@@ -1841,13 +1840,12 @@ namespace MaaWpfGui.Main
|
||||
/// <param name="only_buy_discount">只购买折扣信用商品(未打折的白名单物品仍会购买)。</param>
|
||||
/// <param name="reserve_max_credit">设置300以下信用点停止购买商品。</param>
|
||||
/// <returns>是否成功。</returns>
|
||||
public bool AsstAppendMall(bool creditFight, int selectFormation, bool visitFriends, bool withShopping, string[] firstList, string[] blacklist, bool forceShoppingIfCreditFull, bool only_buy_discount, bool reserve_max_credit)
|
||||
public bool AsstAppendMall(bool creditFight, int selectFormation, bool withShopping, string[] firstList, string[] blacklist, bool forceShoppingIfCreditFull, bool only_buy_discount, bool reserve_max_credit)
|
||||
{
|
||||
var taskParams = new JObject
|
||||
{
|
||||
["credit_fight"] = creditFight,
|
||||
["select_formation"] = selectFormation,
|
||||
["visit_friends"] = visitFriends,
|
||||
["shopping"] = withShopping,
|
||||
["buy_first"] = new JArray { firstList },
|
||||
["blacklist"] = new JArray { blacklist },
|
||||
|
||||
@@ -2170,21 +2170,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
new() { Display = "4", Value = "4" },
|
||||
];
|
||||
|
||||
private bool _CreditVisitFriends = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.CreditVisitFriends, bool.TrueString));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether visiting is enabled or disabled.
|
||||
/// </summary>
|
||||
public bool CreditVisitFriends
|
||||
{
|
||||
get => _CreditVisitFriends;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _CreditVisitFriends, value);
|
||||
ConfigurationHelper.SetValue(ConfigurationKeys.CreditVisitFriends, value.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private int _creditFightSelectFormation = Convert.ToInt32(ConfigurationHelper.GetValue(ConfigurationKeys.CreditFightSelectFormation, "0"));
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1331,7 +1331,6 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
return Instances.AsstProxy.AsstAppendMall(
|
||||
!string.IsNullOrEmpty(this.Stage) && Instances.SettingsViewModel.CreditFightTaskEnabled,
|
||||
Instances.SettingsViewModel.CreditFightSelectFormation,
|
||||
Instances.SettingsViewModel.CreditVisitFriends,
|
||||
Instances.SettingsViewModel.CreditShopping,
|
||||
buyFirst.ToArray(),
|
||||
blackList.ToArray(),
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
Margin="0,10"
|
||||
Block.TextAlignment="Left"
|
||||
Content="{DynamicResource Visiting}"
|
||||
IsChecked="{Binding CreditVisitFriends}" />
|
||||
IsChecked="True"
|
||||
IsEnabled="False" />
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
Block.TextAlignment="Left"
|
||||
Content="{DynamicResource SocialPtShop}"
|
||||
IsChecked="{Binding CreditShopping}" />
|
||||
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
Block.TextAlignment="Left"
|
||||
|
||||
Reference in New Issue
Block a user