Beispiel #1
0
        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");
                }
            }
        }
Beispiel #2
0
        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");
                }
            }
        }
Beispiel #3
0
 public PacketInfo(SniffFile Parent)
 {
     this.Parent = Parent;
 }
Beispiel #4
0
 public PacketInfo(SniffFile Parent)
 {
     this.Parent = Parent;
 }