Exemple #1
0
 public CharData()
 {
     this.m_TextHue = 0x60;
     this.m_EmoteHue = 0x60;
     this.m_WhisperHue = 0x60;
     this.m_YellHue = 0x60;
     this.m_NotoQuery = NotoQueryType.On;
     this.m_AutoPickup = true;
     this.m_RegBag = -1;
     this.m_Stock = -1;
     this.m_DefaultRegs = 100;
     this.m_IncomingNames = true;
     this.m_RestrictCures = true;
     this.m_RestrictHeals = true;
     this.m_NotorietyHues = new int[] { 0x59, 0x3f, 0x517, 0x3b2, 0x90, 0x22, 0x35 };
     this.m_Layout = new ArrayList();
     this.m_Equip = new EquipManager();
     this.m_Friends = new ArrayList();
     this.m_AutoUse = new ArrayList();
 }
Exemple #2
0
 public CharData()
 {
     this.m_TextHue       = 0x60;
     this.m_EmoteHue      = 0x60;
     this.m_WhisperHue    = 0x60;
     this.m_YellHue       = 0x60;
     this.m_NotoQuery     = NotoQueryType.On;
     this.m_AutoPickup    = true;
     this.m_RegBag        = -1;
     this.m_Stock         = -1;
     this.m_DefaultRegs   = 100;
     this.m_IncomingNames = true;
     this.m_RestrictCures = true;
     this.m_RestrictHeals = true;
     this.m_NotorietyHues = new int[] { 0x59, 0x3f, 0x517, 0x3b2, 0x90, 0x22, 0x35 };
     this.m_Layout        = new ArrayList();
     this.m_Equip         = new EquipManager();
     this.m_Friends       = new ArrayList();
     this.m_AutoUse       = new ArrayList();
 }
Exemple #3
0
 public CharData(int Serial)
 {
     this.m_TextHue = 0x60;
     this.m_EmoteHue = 0x60;
     this.m_WhisperHue = 0x60;
     this.m_YellHue = 0x60;
     this.m_NotoQuery = NotoQueryType.On;
     this.m_AutoPickup = true;
     this.m_RegBag = -1;
     this.m_Stock = -1;
     this.m_DefaultRegs = 100;
     this.m_IncomingNames = true;
     this.m_RestrictCures = true;
     this.m_RestrictHeals = true;
     this.m_NotorietyHues = new int[] { 0x59, 0x3f, 0x517, 0x3b2, 0x90, 0x22, 0x35 };
     this.m_Layout = new ArrayList();
     this.m_Equip = new EquipManager();
     this.m_Friends = new ArrayList();
     this.m_AutoUse = new ArrayList();
     this.m_Serial = Serial;
     string path = Engine.FileManager.BasePath("Data/Binary/Chardata.mul");
     if (File.Exists(path))
     {
         try
         {
             using (BinaryReader reader = new BinaryReader(File.OpenRead(path)))
             {
                 int num = reader.ReadInt32();
                 for (int i = 0; i < num; i++)
                 {
                     int num3 = reader.ReadInt32();
                     int num4 = reader.ReadInt32();
                     if (num3 == Serial)
                     {
                         this.LoadEntry(reader);
                         break;
                     }
                     reader.BaseStream.Seek((long) num4, SeekOrigin.Current);
                 }
                 reader.Close();
             }
         }
         catch (Exception exception)
         {
             this.m_TextHue = 0x60;
             this.m_EmoteHue = 0x60;
             this.m_WhisperHue = 0x60;
             this.m_YellHue = 0x60;
             this.m_Equip.AutoEquip.Clear();
             this.m_Layout.Clear();
             this.m_Friends.Clear();
             this.m_AutoUse.Clear();
             Debug.Trace("Chardata.mul read failed.");
             Debug.Error(exception);
             if (MessageBox.Show("Failed to read 'Data/Binary/Chardata.mul', it may be corrupt. If the problem persists, delete the file.\nDelete the file now?", "Client", MessageBoxButtons.YesNo, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
             {
                 try
                 {
                     File.Delete(path);
                 }
                 catch
                 {
                     MessageBox.Show("Failed to delete 'Data/Binary/Chardata.mul'.", "Client", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                 }
             }
         }
     }
 }
Exemple #4
0
        public CharData(int Serial)
        {
            this.m_TextHue       = 0x60;
            this.m_EmoteHue      = 0x60;
            this.m_WhisperHue    = 0x60;
            this.m_YellHue       = 0x60;
            this.m_NotoQuery     = NotoQueryType.On;
            this.m_AutoPickup    = true;
            this.m_RegBag        = -1;
            this.m_Stock         = -1;
            this.m_DefaultRegs   = 100;
            this.m_IncomingNames = true;
            this.m_RestrictCures = true;
            this.m_RestrictHeals = true;
            this.m_NotorietyHues = new int[] { 0x59, 0x3f, 0x517, 0x3b2, 0x90, 0x22, 0x35 };
            this.m_Layout        = new ArrayList();
            this.m_Equip         = new EquipManager();
            this.m_Friends       = new ArrayList();
            this.m_AutoUse       = new ArrayList();
            this.m_Serial        = Serial;
            string path = Engine.FileManager.BasePath("Data/Binary/Chardata.mul");

            if (File.Exists(path))
            {
                try
                {
                    using (BinaryReader reader = new BinaryReader(File.OpenRead(path)))
                    {
                        int num = reader.ReadInt32();
                        for (int i = 0; i < num; i++)
                        {
                            int num3 = reader.ReadInt32();
                            int num4 = reader.ReadInt32();
                            if (num3 == Serial)
                            {
                                this.LoadEntry(reader);
                                break;
                            }
                            reader.BaseStream.Seek((long)num4, SeekOrigin.Current);
                        }
                        reader.Close();
                    }
                }
                catch (Exception exception)
                {
                    this.m_TextHue    = 0x60;
                    this.m_EmoteHue   = 0x60;
                    this.m_WhisperHue = 0x60;
                    this.m_YellHue    = 0x60;
                    this.m_Equip.AutoEquip.Clear();
                    this.m_Layout.Clear();
                    this.m_Friends.Clear();
                    this.m_AutoUse.Clear();
                    Debug.Trace("Chardata.mul read failed.");
                    Debug.Error(exception);
                    if (MessageBox.Show("Failed to read 'Data/Binary/Chardata.mul', it may be corrupt. If the problem persists, delete the file.\nDelete the file now?", "Client", MessageBoxButtons.YesNo, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        try
                        {
                            File.Delete(path);
                        }
                        catch
                        {
                            MessageBox.Show("Failed to delete 'Data/Binary/Chardata.mul'.", "Client", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                        }
                    }
                }
            }
        }