public static bool CheckRewardItem(PlayerMobile player, Item item) { for (var index = 0; index < player.Quests.Count; index++) { BaseQuest quest = player.Quests[index]; for (var i = 0; i < quest.Objectives.Count; i++) { var obj = quest.Objectives[i]; if (obj is ObtainObjective) { for (var index1 = 0; index1 < quest.Objectives.Count; index1++) { BaseObjective objective = quest.Objectives[index1]; if (objective is ObtainObjective obtain && obtain.IsObjective(item)) { obtain.CurProgress += item.Amount; quest.OnObjectiveUpdate(item); return(true); } } break; } } } return(false); }