Fix crash if quest doesnt have any objectives
This commit is contained in:
@@ -738,7 +738,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
byte objectiveIndex = result.Read<byte>(1);
|
byte objectiveIndex = result.Read<byte>(1);
|
||||||
|
|
||||||
var objectiveItr = quest.Objectives.First(objective => { return objective.StorageIndex == objectiveIndex; });
|
var objectiveItr = quest.Objectives.FirstOrDefault(objective => { return objective.StorageIndex == objectiveIndex; });
|
||||||
if (objectiveIndex < questStatusData.ObjectiveData.Length && objectiveItr != null)
|
if (objectiveIndex < questStatusData.ObjectiveData.Length && objectiveItr != null)
|
||||||
{
|
{
|
||||||
int data = result.Read<int>(2);
|
int data = result.Read<int>(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user