Skip to content

Commit

Permalink
Add null check for quest loading in CheckDailyv2 method
Browse files Browse the repository at this point in the history
  • Loading branch information
PUNK3DAF committed Feb 14, 2025
1 parent 4e58604 commit 3d131a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CoreDailies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ public void DailyRoutine(int quest, string map, string monster, string item, int

public bool CheckDailyv2(int quest, bool any = true, bool shouldUnBank = true, params string[] items)
{
Quest Quest = Core.InitializeWithRetries(() => Core.EnsureLoad(quest));
Quest? Quest = Core.InitializeWithRetries(() => Core.EnsureLoad(quest));
if (Quest == null)
{
Core.Logger($"Failed to load quest {quest}");
return false;
}
// Check if the daily quest is complete
if (Bot.Quests.IsDailyComplete(quest))
{
Expand Down

0 comments on commit 3d131a7

Please sign in to comment.