private static void HandleToggleTracking(GameSession session, PacketReader packet) { int questId = packet.ReadInt(); bool tracked = packet.ReadBool(); if (!session.Player.QuestData.TryGetValue(questId, out QuestStatus questStatus)) { return; } questStatus.Tracked = tracked; DatabaseManager.Quests.Update(questStatus); session.Send(QuestPacket.ToggleTracking(questId, tracked)); }
private static void HandleToggleTracking(GameSession session, PacketReader packet) { int questId = packet.ReadInt(); bool tracked = packet.ReadBool(); QuestStatus questStatus = session.Player.QuestList.FirstOrDefault(x => x.Basic.Id == questId); if (questStatus == null) { return; } questStatus.Tracked = tracked; DatabaseManager.Quests.Update(questStatus); session.Send(QuestPacket.ToggleTracking(questId, tracked)); }