public void CheckInit() { lock (Packets) { if (!Inited) { int Count = 0; string[] Files = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "Abilities/"), "*.txt", SearchOption.TopDirectoryOnly); foreach (string P in Files) { SniffFile SFile = new SniffFile(); SFile.FilePath = P; SFile.Analyze(CanAnalyze); byte CurrentCareer = 0; List <PacketInfo> L = null; foreach (PacketInfo Info in SFile.Packets) { if (Info.Opcode == 0x88) // INITED { CurrentCareer = Info.Data[33 + 3]; if (!Packets.ContainsKey(CurrentCareer)) { L = new List <PacketInfo>(); Packets.Add(CurrentCareer, L); } else { L = Packets[CurrentCareer]; } } else if (CanAnalyze(Info.OpcodeName)) { if (Info.OpcodeName != "F_INTRO_CINEMA") { L.Add(Info); ++Count; } else { Intros.Add(CurrentCareer, Info); } } } } Log.Success("Packages", "Loaded " + Count + " packages"); } } }
public void CheckInit() { lock (Packets) { if (!Inited) { int Count = 0; string[] Files = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), "Abilities/"), "*.txt", SearchOption.TopDirectoryOnly); foreach (string P in Files) { SniffFile SFile = new SniffFile(); SFile.FilePath = P; SFile.Analyze(CanAnalyze); byte CurrentCareer = 0; List<PacketInfo> L = null; foreach (PacketInfo Info in SFile.Packets) { if (Info.Opcode == 0x88) // INITED { CurrentCareer = Info.Data[33 + 3]; if (!Packets.ContainsKey(CurrentCareer)) { L = new List<PacketInfo>(); Packets.Add(CurrentCareer, L); } else L = Packets[CurrentCareer]; } else if (CanAnalyze(Info.OpcodeName)) { if (Info.OpcodeName != "F_INTRO_CINEMA") { L.Add(Info); ++Count; } else { Intros.Add(CurrentCareer, Info); } } } } Log.Success("Packages", "Loaded " + Count + " packages"); } } }
public PacketInfo(SniffFile Parent) { this.Parent = Parent; }