Skip to content

Commit

Permalink
feat(sqlite): implement quest logging
Browse files Browse the repository at this point in the history
DorielRivalet committed Dec 25, 2022
1 parent 11f9a5a commit 12a6c02
Showing 4 changed files with 245 additions and 171 deletions.
24 changes: 21 additions & 3 deletions MHFZ_Overlay/ConfigWindow.xaml
Original file line number Diff line number Diff line change
@@ -1814,10 +1814,28 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<DockPanel>

</DockPanel>
<Grid Grid.Row="0" Background="Transparent" Style="{StaticResource ConfigSingleGrid}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Margin="5,5,5,5" ToolTip="Enable logging of quests when completing them and inserts the information into a local database" Style="{StaticResource ConfigTextBox}" Grid.Row="0" Grid.Column="0" Text="Enable Quest Logging"/>
<ToggleButton Grid.Row="0" Grid.Column="1" Style="{StaticResource MaterialDesignSwitchToggleButton}" IsChecked="{Binding Source={StaticResource Settings}, Path=EnableQuestLogging}"/>
</Grid>
<TextBlock Margin="5,5,5,5" ToolTip="Enable logging of quests when completing them and inserts the information into a local database" Style="{StaticResource ConfigTextBox}" Grid.Row="1" Grid.Column="0" Text="Enable Quest Logging"/>
</Grid>
</ScrollViewer>
</DockPanel>
299 changes: 172 additions & 127 deletions MHFZ_Overlay/Core/Class/DataAccessLayer/DatabaseManager.cs
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
using System.Collections;
using Octokit;
using System.Windows.Controls;
using System.Diagnostics;

// TODO: PascalCase for functions, camelCase for private fields, ALL_CAPS for constants
namespace MHFZ_Overlay
@@ -27,7 +28,7 @@ internal class DatabaseManager
{
private readonly string _connectionString;

private readonly string dataSource = "Data Source="+Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "MHFZ_Overlay\\MHFZ_Overlay.sqlite");
public readonly string dataSource = "Data Source="+Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "MHFZ_Overlay\\MHFZ_Overlay.sqlite");

private static DatabaseManager instance;

@@ -122,8 +123,11 @@ public void SetupLocalDatabase(DataLoader dataLoader)
// }
//}

private void InsertQuestData(string connectionString, DataLoader dataLoader)
public void InsertQuestData(string connectionString, DataLoader dataLoader)
{
if (!dataLoader.model.questCleared)
return;

using (SQLiteConnection conn = new SQLiteConnection(connectionString))
{
conn.Open();
@@ -196,7 +200,7 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
objectiveName = model.GetRealMonsterName(model.CurrentMonster1Icon, true);

string rankName = model.GetRankNameFromID(model.RankBand(), true);
int objectiveQuantity = int.Parse(model.GetObjective1Quantity());
int objectiveQuantity = model.Objective1Quantity();
int starGrade = model.StarGrades();

if ((model.ObjectiveType() == 0x0 || model.ObjectiveType() == 0x02 || model.ObjectiveType() == 0x1002 || model.ObjectiveType() == 0x10) && (model.QuestID() != 23527 && model.QuestID() != 23628 && model.QuestID() != 21731 && model.QuestID() != 21749 && model.QuestID() != 21746 && model.QuestID() != 21750))
@@ -374,9 +378,9 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
int caravanSkill3ID = model.CaravanSkill3();

cmd.Parameters.AddWithValue("@RunID", runID);
cmd.Parameters.AddWithValue("@ZenithSkill1ID", caravanSkill1ID);
cmd.Parameters.AddWithValue("@ZenithSkill2ID", caravanSkill2ID);
cmd.Parameters.AddWithValue("@ZenithSkill3ID", caravanSkill3ID);
cmd.Parameters.AddWithValue("@CaravanSkill1ID", caravanSkill1ID);
cmd.Parameters.AddWithValue("@CaravanSkill2ID", caravanSkill2ID);
cmd.Parameters.AddWithValue("@CaravanSkill3ID", caravanSkill3ID);
cmd.ExecuteNonQuery();
}

@@ -394,8 +398,8 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
int styleRankSkill2ID = model.StyleRank2();

cmd.Parameters.AddWithValue("@RunID", runID);
cmd.Parameters.AddWithValue("@ZenithSkill1ID", styleRankSkill1ID);
cmd.Parameters.AddWithValue("@ZenithSkill2ID", styleRankSkill2ID);
cmd.Parameters.AddWithValue("@StyleRankSkill1ID", styleRankSkill1ID);
cmd.Parameters.AddWithValue("@StyleRankSkill2ID", styleRankSkill2ID);
cmd.ExecuteNonQuery();
}

@@ -836,6 +840,9 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
}

string gearName = s.GearDescriptionExport;
if (gearName == "" || gearName == null)
gearName = "Unnamed";

int weaponTypeID = model.WeaponType();
int weaponClassID = weaponTypeID;
int weaponID = model.BlademasterWeaponID();//ranged and melee are the same afaik
@@ -871,98 +878,126 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
int guildFoodID = model.GuildFoodSkill();
int poogieItemID = model.PoogieItemUseID();

int? blademasterWeaponID = null;
int? gunnerWeaponID = null;

//Check the WeaponTypeID and insert the corresponding weapon ID
switch (weaponTypeID)
{
case 0:
case 2:
case 3:
case 4:
case 6:
case 7:
case 8:
case 9:
case 11:
case 12:
case 13:
blademasterWeaponID = model.BlademasterWeaponID();
break;
case 1:
case 5:
case 10:
gunnerWeaponID = model.GunnerWeaponID();
break;
}

string insertSql = @"INSERT INTO PlayerGear (
RunID,
PlayerID,
GearName,
StyleID,
WeaponIconID,
WeaponClassID,
WeaponTypeID,
BlademasterWeaponID,
GunnerWeaponID,
WeaponSlot1,
WeaponSlot2,
WeaponSlot3,
HeadID,
HeadSlot1ID,
HeadSlot2ID,
HeadSlot3ID,
ChestID,
ChestSlot1ID,
ChestSlot2ID,
ChestSlot3ID,
ArmsID,
ArmsSlot1ID,
ArmsSlot2ID,
ArmsSlot3ID,
WaistID,
WaistSlot1ID,
WaistSlot2ID,
WaistSlot3ID,
LegsID,
LegsSlot1ID,
LegsSlot2ID,
LegsSlot3ID,
Cuff1ID,
Cuff2ID,
ZenithSkillsID,
AutomaticSkillsID,
ActiveSkillsID,
CaravanSkillsID,
DivaSkillID,
GuildFoodID,
StyleRankSkillsID,
PlayerInventoryID,
AmmoPouchID,
PoogieItemID,
RoadDureSkillsID
) VALUES (
@RunID,
@PlayerID,
@GearName,
@StyleID,
@WeaponIconID,
@WeaponClassID,
@WeaponTypeID,
@BlademasterWeaponID,
@GunnerWeaponID,
@WeaponSlot1,
@WeaponSlot2,
@WeaponSlot3,
@HeadID,
@HeadSlot1ID,
@HeadSlot2ID,
@HeadSlot3ID,
@ChestID,
@ChestSlot1ID,
@ChestSlot2ID,
@ChestSlot3ID,
@ArmsID,
@ArmsSlot1ID,
@ArmsSlot2ID,
@ArmsSlot3ID,
@WaistID,
@WaistSlot1ID,
@WaistSlot2ID,
@WaistSlot3ID,
@LegsID,
@LegsSlot1ID,
@LegsSlot2ID,
@LegsSlot3ID,
@Cuff1ID,
@Cuff2ID,
@ZenithSkillsID,
@AutomaticSkillsID,
@ActiveSkillsID,
@CaravanSkillsID,
@DivaSkillID,
@GuildFoodID,
@StyleRankSkillsID,
@PlayerInventoryID,
@AmmoPouchID,
@PoogieItemID,
@RoadDureSkillsID
--PlayerGearID INTEGER PRIMARY KEY AUTOINCREMENT,
RunID, --INTEGER NOT NULL,
PlayerID, --INTEGER NOT NULL,
GearName, --TEXT NOT NULL,
StyleID, --INTEGER NOT NULL CHECK (StyleID >= 0),
WeaponIconID, --INTEGER NOT NULL,
WeaponClassID, --INTEGER NOT NULL,
WeaponTypeID, --INTEGER NOT NULL CHECK (WeaponTypeID >= 0),
BlademasterWeaponID, --INTEGER,
GunnerWeaponID, --INTEGER,
WeaponSlot1, --TEXT NOT NULL,
WeaponSlot2, --TEXT NOT NULL,
WeaponSlot3, --TEXT NOT NULL,
HeadID, --INTEGER NOT NULL CHECK (HeadID >= 0),
HeadSlot1ID, --INTEGER NOT NULL CHECK (HeadSlot1ID >= 0),
HeadSlot2ID, --INTEGER NOT NULL CHECK (HeadSlot2ID >= 0),
HeadSlot3ID, --INTEGER NOT NULL CHECK (HeadSlot3ID >= 0),
ChestID, --INTEGER NOT NULL CHECK (ChestID >= 0),
ChestSlot1ID, --INTEGER NOT NULL CHECK (ChestSlot1ID >= 0),
ChestSlot2ID,-- INTEGER NOT NULL CHECK (ChestSlot2ID >= 0),
ChestSlot3ID,-- INTEGER NOT NULL CHECK (ChestSlot3ID >= 0),
ArmsID,-- INTEGER NOT NULL CHECK (ArmsID >= 0),
ArmsSlot1ID,-- INTEGER NOT NULL CHECK (ArmsSlot1ID >= 0),
ArmsSlot2ID,-- INTEGER NOT NULL CHECK (ArmsSlot2ID >= 0),
ArmsSlot3ID,-- INTEGER NOT NULL CHECK (ArmsSlot3ID >= 0),
WaistID,-- INTEGER NOT NULL CHECK (WaistID >= 0),
WaistSlot1ID,-- INTEGER NOT NULL CHECK (WaistSlot1ID >= 0),
WaistSlot2ID,-- INTEGER NOT NULL CHECK (WaistSlot2ID >= 0),
WaistSlot3ID,-- INTEGER NOT NULL CHECK (WaistSlot3ID >= 0),
LegsID,-- INTEGER NOT NULL CHECK (LegsID >= 0),
LegsSlot1ID,-- INTEGER NOT NULL CHECK (LegsSlot1ID >= 0),
LegsSlot2ID,-- INTEGER NOT NULL CHECK (LegsSlot2ID >= 0),
LegsSlot3ID,-- INTEGER NOT NULL CHECK (LegsSlot3ID >= 0),
Cuff1ID,-- INTEGER NOT NULL CHECK (Cuff1ID >= 0),
Cuff2ID,-- INTEGER NOT NULL CHECK (Cuff2ID >= 0),
ZenithSkillsID,-- INTEGER NOT NULL,
AutomaticSkillsID,-- INTEGER NOT NULL,
ActiveSkillsID,-- INTEGER NOT NULL,
CaravanSkillsID,-- INTEGER NOT NULL,
DivaSkillID,-- INTEGER NOT NULL,
GuildFoodID,-- INTEGER NOT NULL,
StyleRankSkillsID,-- INTEGER NOT NULL,
PlayerInventoryID,-- INTEGER NOT NULL,
AmmoPouchID,-- INTEGER NOT NULL,
PoogieItemID,-- INTEGER NOT NULL,
RoadDureSkillsID-- INTEGER NOT NULL,
) VALUES (
--PlayerGearID INTEGER PRIMARY KEY AUTOINCREMENT,
@RunID, --INTEGER NOT NULL,
@PlayerID, --INTEGER NOT NULL,
@GearName, --TEXT NOT NULL,
@StyleID, --INTEGER NOT NULL CHECK (StyleID >= 0),
@WeaponIconID, --INTEGER NOT NULL,
@WeaponClassID, --INTEGER NOT NULL,
@WeaponTypeID, --INTEGER NOT NULL CHECK (WeaponTypeID >= 0),
@BlademasterWeaponID, --INTEGER,
@GunnerWeaponID, --INTEGER,
@WeaponSlot1, --TEXT NOT NULL,
@WeaponSlot2, --TEXT NOT NULL,
@WeaponSlot3, --TEXT NOT NULL,
@HeadID, --INTEGER NOT NULL CHECK (HeadID >= 0),
@HeadSlot1ID, --INTEGER NOT NULL CHECK (HeadSlot1ID >= 0),
@HeadSlot2ID, --INTEGER NOT NULL CHECK (HeadSlot2ID >= 0),
@HeadSlot3ID, --INTEGER NOT NULL CHECK (HeadSlot3ID >= 0),
@ChestID, --INTEGER NOT NULL CHECK (ChestID >= 0),
@ChestSlot1ID, --INTEGER NOT NULL CHECK (ChestSlot1ID >= 0),
@ChestSlot2ID,-- INTEGER NOT NULL CHECK (ChestSlot2ID >= 0),
@ChestSlot3ID,-- INTEGER NOT NULL CHECK (ChestSlot3ID >= 0),
@ArmsID,-- INTEGER NOT NULL CHECK (ArmsID >= 0),
@ArmsSlot1ID,-- INTEGER NOT NULL CHECK (ArmsSlot1ID >= 0),
@ArmsSlot2ID,-- INTEGER NOT NULL CHECK (ArmsSlot2ID >= 0),
@ArmsSlot3ID,-- INTEGER NOT NULL CHECK (ArmsSlot3ID >= 0),
@WaistID,-- INTEGER NOT NULL CHECK (WaistID >= 0),
@WaistSlot1ID,-- INTEGER NOT NULL CHECK (WaistSlot1ID >= 0),
@WaistSlot2ID,-- INTEGER NOT NULL CHECK (WaistSlot2ID >= 0),
@WaistSlot3ID,-- INTEGER NOT NULL CHECK (WaistSlot3ID >= 0),
@LegsID,-- INTEGER NOT NULL CHECK (LegsID >= 0),
@LegsSlot1ID,-- INTEGER NOT NULL CHECK (LegsSlot1ID >= 0),
@LegsSlot2ID,-- INTEGER NOT NULL CHECK (LegsSlot2ID >= 0),
@LegsSlot3ID,-- INTEGER NOT NULL CHECK (LegsSlot3ID >= 0),
@Cuff1ID,-- INTEGER NOT NULL CHECK (Cuff1ID >= 0),
@Cuff2ID,-- INTEGER NOT NULL CHECK (Cuff2ID >= 0),
@ZenithSkillsID,-- INTEGER NOT NULL,
@AutomaticSkillsID,-- INTEGER NOT NULL,
@ActiveSkillsID,-- INTEGER NOT NULL,
@CaravanSkillsID,-- INTEGER NOT NULL,
@DivaSkillID,-- INTEGER NOT NULL,
@GuildFoodID,-- INTEGER NOT NULL,
@StyleRankSkillsID,-- INTEGER NOT NULL,
@PlayerInventoryID,-- INTEGER NOT NULL,
@AmmoPouchID,-- INTEGER NOT NULL,
@PoogieItemID,-- INTEGER NOT NULL,
@RoadDureSkillsID-- INTEGER NOT NULL,
)";

using (SQLiteCommand cmd = new SQLiteCommand(insertSql, conn))
@@ -974,35 +1009,25 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
cmd.Parameters.AddWithValue("@WeaponIconID", weaponIconID);
cmd.Parameters.AddWithValue("@WeaponClassID", weaponClassID);
cmd.Parameters.AddWithValue("@WeaponTypeID", weaponTypeID);

//Check the WeaponTypeID and insert the corresponding weapon ID
switch (weaponTypeID)
if (blademasterWeaponID == null)
{
case 1:
case 5:
case 10:
cmd.Parameters.AddWithValue("@BlademasterWeaponID", weaponID);
cmd.Parameters.AddWithValue("@GunnerWeaponID", DBNull.Value);
break;
case 0:
case 2:
case 3:
case 4:
case 6:
case 7:
case 8:
case 9:
case 11:
case 12:
case 13:
cmd.Parameters.AddWithValue("@BlademasterWeaponID", DBNull.Value);
cmd.Parameters.AddWithValue("@GunnerWeaponID", weaponID);
break;
cmd.Parameters.AddWithValue("@BlademasterWeaponID", DBNull.Value);
}
else
{
cmd.Parameters.AddWithValue("@BlademasterWeaponID", blademasterWeaponID);
}
if (gunnerWeaponID == null)
{
cmd.Parameters.AddWithValue("@GunnerWeaponID", DBNull.Value);
}
else
{
cmd.Parameters.AddWithValue("@GunnerWeaponID", gunnerWeaponID);
}

cmd.Parameters.AddWithValue("@WeaponSlot1", weaponSlot1);
cmd.Parameters.AddWithValue("@WeaponSlot1", weaponSlot2);
cmd.Parameters.AddWithValue("@WeaponSlot1", weaponSlot3);
cmd.Parameters.AddWithValue("@WeaponSlot2", weaponSlot2);
cmd.Parameters.AddWithValue("@WeaponSlot3", weaponSlot3);
cmd.Parameters.AddWithValue("@HeadID", headID);
cmd.Parameters.AddWithValue("@HeadSlot1ID", headSlot1);
cmd.Parameters.AddWithValue("@HeadSlot2ID", headSlot2);
@@ -1029,7 +1054,7 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
cmd.Parameters.AddWithValue("@AutomaticSkillsID", automaticSkillsID);
cmd.Parameters.AddWithValue("@ActiveSkillsID", activeSkillsID);
cmd.Parameters.AddWithValue("@CaravanSkillsID", caravanSkillsID);
cmd.Parameters.AddWithValue("@DivaSkillsID", divaSkillID);
cmd.Parameters.AddWithValue("@DivaSkillID", divaSkillID);
cmd.Parameters.AddWithValue("@GuildFoodID", guildFoodID);
cmd.Parameters.AddWithValue("@StyleRankSkillsID", styleRankSkillsID);
cmd.Parameters.AddWithValue("@PlayerInventoryID", playerInventoryID);
@@ -1044,6 +1069,26 @@ private void InsertQuestData(string connectionString, DataLoader dataLoader)
// Commit the transaction
transaction.Commit();
}
catch (SQLiteException ex)
{
if (transaction != null)
transaction.Rollback();
// Handle a SQL exception
MessageBox.Show("An error occurred while accessing the database: " + ex.SqlState+"\n\n"+ex.HelpLink+"\n\n"+ex.ResultCode+"\n\n"+ex.ErrorCode+"\n\n"+ex.Source+"\n\n"+ex.StackTrace+"\n\n"+ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
catch (IOException ex)
{
if (transaction != null)
transaction.Rollback();
// Handle an I/O exception
MessageBox.Show("An error occurred while accessing a file: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
catch (ArgumentException ex)
{
if (transaction != null)
transaction.Rollback();
MessageBox.Show("ArgumentException " + ex.Message + " " + ex.ParamName);
}
catch (Exception ex)
{
HandleError(transaction, ex);
@@ -1136,7 +1181,7 @@ private void HandleError(SQLiteTransaction? transaction, Exception ex)
transaction.Rollback();

// Handle the exception and show an error message to the user
MessageBox.Show("An error occurred: " + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
MessageBox.Show("An error occurred: " + ex.Message +"\n\n" + ex.StackTrace + "\n\n" +ex.Source+"\n\n"+ex.Data.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}

#region session time
91 changes: 50 additions & 41 deletions MHFZ_Overlay/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1610,6 +1610,47 @@ private bool IsInHubAreaID()
}
}

//quest ids:
//mp road: 23527
//solo road: 23628
//1st district dure: 21731
//2nd district dure: 21746
//1st district dure sky corridor: 21749
//2nd district dure sky corridor: 21750
//arrogant dure repel: 23648
//arrogant dure slay: 23649
//urgent tower: 21751
//4th district dure: 21748
//3rd district dure: 21747
//3rd district dure 2: 21734
//UNUSED sky corridor: 21730
//sky corridor prologue: 21729
//raviente 62105
//raviente carve 62108
///violent raviente 62101
///violent carve 62104
//berserk slay practice 55796
//berserk support practice 1 55802
//berserk support practice 2 55803
//berserk support practice 3 55804
//berserk support practice 4 55805
//berserk support practice 5 55806
//berserk practice carve 55807
//berserk slay 54751
//berserk support 1 54756
//berserk support 2 54757
//berserk support 3 54758
//berserk support 4 54759
//berserk support 5 54760
//berserk carve 54761
//extreme slay (musou table 54) 55596
//extreme support 1 55602
//extreme support 2 55603
//extreme support 3 55604
//extreme support 4 55605
//extreme support 5 55606
//extreme carve 55607

/// <summary>
/// Updates the discord RPC.
/// </summary>
@@ -1622,46 +1663,6 @@ private void UpdateDiscordRPC()

presenceTemplate.Details = string.Format("{0}{1}{2}{3}{4}{5}", GetPartySize(), GetQuestState(), GetCaravanScore(), GetOverlayMode(), DataLoader.model.GetAreaName(DataLoader.model.AreaID()), GetGameMode(DataLoader.isHighGradeEdition));

//quest ids:
//mp road: 23527
//solo road: 23628
//1st district dure: 21731
//2nd district dure: 21746
//1st district dure sky corridor: 21749
//2nd district dure sky corridor: 21750
//arrogant dure repel: 23648
//arrogant dure slay: 23649
//urgent tower: 21751
//4th district dure: 21748
//3rd district dure: 21747
//3rd district dure 2: 21734
//UNUSED sky corridor: 21730
//sky corridor prologue: 21729
//raviente 62105
//raviente carve 62108
///violent raviente 62101
///violent carve 62104
//berserk slay practice 55796
//berserk support practice 1 55802
//berserk support practice 2 55803
//berserk support practice 3 55804
//berserk support practice 4 55805
//berserk support practice 5 55806
//berserk practice carve 55807
//berserk slay 54751
//berserk support 1 54756
//berserk support 2 54757
//berserk support 3 54758
//berserk support 4 54759
//berserk support 5 54760
//berserk carve 54761
//extreme slay (musou table 54) 55596
//extreme support 1 55602
//extreme support 2 55603
//extreme support 3 55604
//extreme support 4 55605
//extreme support 5 55606
//extreme carve 55607
if (IsInHubAreaID() && DataLoader.model.QuestID() == 0)
DataLoader.model.PreviousHubAreaID = DataLoader.model.AreaID();

@@ -2019,9 +2020,17 @@ private void UpdateDiscordRPC()
}
}
}
else if (DataLoader.model.QuestID() == 0 && inQuest && int.Parse(DataLoader.model.ATK) == 0)
// check if quest clear
else if (DataLoader.model.QuestState() == 1 && !DataLoader.model.questCleared)
{
DataLoader.model.questCleared = true;
databaseManager.InsertQuestData(databaseManager.dataSource, DataLoader);
}
// going back to Mezeporta or w/e
else if (DataLoader.model.QuestState() != 1 && DataLoader.model.QuestID() == 0 && inQuest && int.Parse(DataLoader.model.ATK) == 0)
{
inQuest = false;
DataLoader.model.questCleared = false;

//reset values
currentMonster1MaxHP = 0;
2 changes: 2 additions & 0 deletions MHFZ_Overlay/addresses/AddressModel.cs
Original file line number Diff line number Diff line change
@@ -8273,6 +8273,8 @@ public string GetAreaName(int id)

public TimeSpan TotalTimeSpent { get; set; }

public bool questCleared = false;

public event PropertyChangedEventHandler? PropertyChanged;

/// <summary>

0 comments on commit 12a6c02

Please sign in to comment.