private void OnExecute() { if (!AssetLoader.FindAssetRoot(Assets)) { Log.Print(LogType.Error, "AtlasReactor_Data folder not found, please specify with --assets!"); Log.Print(LogType.Misc, "Alternatively, place Win64 or AtlasReactor_Data in this folder."); return; } HashResolver.Init(AssetLoader.BasePath); PacketProvider provider; if (!PacketsDir.IsNullOrEmpty()) { provider = new DirectoryPacketProvider(PacketsDir); } else if (!ReplayFile.IsNullOrEmpty()) { provider = new ReplayPacketProvider(ReplayFile); } else { throw new ArgumentOutOfRangeException(nameof(provider), "Neither PacketsDir or ReplayFile provided!"); } var pdp = new PacketDumpProcessor(provider); pdp.Process(); }
public void LoadPacketDump(PacketDumpType type, string path) { _buttonOpenFolder.Sensitive = false; _buttonOpenReplay.Sensitive = false; Reset(); PacketProvider provider; switch (type) { case PacketDumpType.ReplayFile: provider = new ReplayPacketProvider(path); break; case PacketDumpType.PacketDirectory: provider = new DirectoryPacketProvider(path); break; default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } var pdp = new PacketDumpProcessor(provider); pdp.Process(); AddNetObjects(pdp); AddPackets(pdp); }