Example #1
0
        public string exportPlayerAppareance(Controller controller)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Id;UNK1;UNK2;UNK3;UNK4;UNK5;UNK6;UNK7;UNK8;UNK9;UNK10;UNK11;UNK12;UNK13;UNK14;UNK15;UNK16;UNK17;UNK18;UNK19;UNK20;UNK21;UNK22;UNK23;UNK24;UNK25;UNK26;UNK27;UNK28;UNK29;UNK30;UNK31;UNK32;UNK33;UNK34;UNK35;UNK36;Eyes_Skin_Color;38;UNK39;UNK40;UNK41;UNK42;UNK43;UNK44;UNK45;UNK46;UNK47;UNK48;UNK49;UNK50;UNK51;UNK52;UNK53;UNK54;UNK55;UNK56");
            sb.Append("\n");
            for (int i = 0; i < Form1._Form1.playersBox.Items.Count; i++)
            {
                PlayerAppearance temp = controller.leggiGiocatoreApparenza(controller.leggiGiocatore(i).getId());
                if (temp != null)
                {
                    sb.Append(temp.getId() + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown1()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown2()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown3()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown4()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown5()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown6()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown7()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown8()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown9()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown10()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown11()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown12()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown13()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown14()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown15()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown16()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown17()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown18()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown19()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown20()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown21()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown22()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown23()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown24()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown25()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown26()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown27()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown28()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown29()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown30()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown31()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown32()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown33()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown34()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown35()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown36()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getEyeskinColor()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown38()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown39()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown40()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown41()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown42()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown43()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown44()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown45()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown46()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown47()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown48()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown49()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown50()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown51()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown52()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown53()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown54()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown55()) + ";");
                    sb.Append(string.Format("{0:X2}", temp.getUnknown56()) + ";");
                    sb.Append("\n");
                }
            }
            return(sb.ToString());
        }
Example #2
0
        public void applyPlayerAppearance(BinaryReader reader, int bitRecognized, MemoryStream unzlib, PlayerAppearance playerApp, ref BinaryWriter writer)
        {
            //calcolo giocatori
            // Create new FileInfo object and get the Length.
            int bytes_player   = (int)unzlib.Length;
            int calcolo_player = bytes_player / block;

            long START2 = -block;

            for (int i = 0; i <= (calcolo_player - 1); i++)
            {
                START2 += block;
                unzlib.Seek(START2, SeekOrigin.Begin);

                UInt32 Check_order = 0;
                if (bitRecognized == 0)
                {
                    Check_order = reader.ReadUInt32();
                }
                else if (bitRecognized == 1 || bitRecognized == 2)
                {
                    Check_order = UnzlibZlibConsole.swaps.swap32(reader.ReadUInt32());
                }
                if (playerApp.getId() == Check_order)
                {
                    writer.BaseStream.Position = START2;
                    if (bitRecognized == 0)
                    {
                        writer.Write(playerApp.getId());
                    }
                    else if (bitRecognized == 1 || bitRecognized == 2)
                    {
                        writer.Write(UnzlibZlibConsole.swaps.swap32(playerApp.getId()));
                    }
                    writer.Write(playerApp.getUnknown1());
                    writer.Write(playerApp.getUnknown2());
                    writer.Write(playerApp.getUnknown3());
                    writer.Write(playerApp.getUnknown4());
                    writer.Write(playerApp.getUnknown5());
                    writer.Write(playerApp.getUnknown6());
                    writer.Write(playerApp.getUnknown7());
                    writer.Write(playerApp.getUnknown8());
                    writer.Write(playerApp.getUnknown9());
                    writer.Write(playerApp.getUnknown10());
                    writer.Write(playerApp.getUnknown11());
                    writer.Write(playerApp.getUnknown12());
                    writer.Write(playerApp.getUnknown13());
                    writer.Write(playerApp.getUnknown14());
                    writer.Write(playerApp.getUnknown15());
                    writer.Write(playerApp.getUnknown16());
                    writer.Write(playerApp.getUnknown17());
                    writer.Write(playerApp.getUnknown18());
                    writer.Write(playerApp.getUnknown19());
                    writer.Write(playerApp.getUnknown20());
                    writer.Write(playerApp.getUnknown21());
                    writer.Write(playerApp.getUnknown22());
                    writer.Write(playerApp.getUnknown23());
                    writer.Write(playerApp.getUnknown24());
                    writer.Write(playerApp.getUnknown25());
                    writer.Write(playerApp.getUnknown26());
                    writer.Write(playerApp.getUnknown27());
                    writer.Write(playerApp.getUnknown28());
                    writer.Write(playerApp.getUnknown29());
                    writer.Write(playerApp.getUnknown30());
                    writer.Write(playerApp.getUnknown31());
                    writer.Write(playerApp.getUnknown32());
                    writer.Write(playerApp.getUnknown33());
                    writer.Write(playerApp.getEyeskinColor());
                    writer.Write(playerApp.getUnknown34());
                    writer.Write(playerApp.getUnknown35());
                    writer.Write(playerApp.getUnknown36());
                    writer.Write(playerApp.getUnknown38());
                    writer.Write(playerApp.getUnknown39());
                    writer.Write(playerApp.getUnknown40());
                    writer.Write(playerApp.getUnknown41());
                    writer.Write(playerApp.getUnknown42());
                    writer.Write(playerApp.getUnknown43());
                    writer.Write(playerApp.getUnknown44());
                    writer.Write(playerApp.getUnknown45());
                    writer.Write(playerApp.getUnknown46());
                    writer.Write(playerApp.getUnknown47());
                    writer.Write(playerApp.getUnknown48());
                    writer.Write(playerApp.getUnknown49());
                    writer.Write(playerApp.getUnknown50());
                    writer.Write(playerApp.getUnknown51());
                    writer.Write(playerApp.getUnknown52());
                    writer.Write(playerApp.getUnknown53());
                    writer.Write(playerApp.getUnknown54());
                    writer.Write(playerApp.getUnknown55());
                    writer.Write(playerApp.getUnknown56());
                    return;
                }
            }
        }