Skip to content

Commit

Permalink
[HaCreator] quest editor: handle 'autoAccept' info property
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Nov 24, 2024
1 parent 4aefed2 commit a701b11
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions HaCreator/GUI/Quest/QuestEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ private void LoadQuestsData()
quest.AutoPreComplete = (questProp["autoPreComplete"] as WzIntProperty)?.Value > 0;
quest.AutoComplete = (questProp["autoComplete"] as WzIntProperty)?.Value > 0;
quest.SelectedMob = (questProp["selectedMob"] as WzIntProperty)?.Value > 0;
quest.AutoAccept = (questProp["autoAccept"] as WzIntProperty)?.Value > 0;
quest.AutoCancel = (questProp["autoCancel"] as WzIntProperty)?.Value > 0;
quest.OneShot = (questProp["oneShot"] as WzIntProperty)?.Value > 0;

Expand Down Expand Up @@ -3114,6 +3115,10 @@ private void button_saveQuest_Click(object sender, RoutedEventArgs e)
{
questWzSubProp.AddProperty(new WzIntProperty("selectedMob", 1));
}
if (quest.AutoAccept == true)
{
questWzSubProp.AddProperty(new WzIntProperty("autoAccept", 1));
}
if (quest.AutoCancel == true)
{
questWzSubProp.AddProperty(new WzIntProperty("autoCancel", 1));
Expand Down
12 changes: 11 additions & 1 deletion HaCreator/GUI/Quest/QuestEditorModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class QuestEditorModel : INotifyPropertyChanged
private bool _blocked;
private int _order;
private bool _autoPreComplete, _autoComplete, _autoStart;
private bool _selectedMob, _autoCancel, _oneShot;
private bool _selectedMob, _autoAccept, _autoCancel, _oneShot;
private bool _disableAtStartTab, _disableAtPerformTab, _disableAtCompleteTab;
private string _demandSummary = string.Empty, _rewardSummary = string.Empty;

Expand Down Expand Up @@ -214,6 +214,16 @@ public bool SelectedMob
}
}

public bool AutoAccept
{
get => _autoAccept;
set
{
_autoAccept = value;
OnPropertyChanged(nameof(AutoAccept));
}
}

public bool AutoCancel
{
get => _autoCancel;
Expand Down
2 changes: 1 addition & 1 deletion MapleLib

0 comments on commit a701b11

Please sign in to comment.