Esempio n. 1
0
        public override void Write(PythonWriter pw)
        {
            pw.WriteTuple(1);
            pw.WriteDictionary(9);

            pw.WriteString("SlotId");
            pw.WriteUInt(SlotId);

            pw.WriteString("IsSelected");
            pw.WriteInt(IsSelected ? 1 : 0);

            pw.WriteString("BodyData");
            pw.WriteStruct(BodyData);

            pw.WriteString("CharacterData");
            pw.WriteStruct(CharacterData);

            pw.WriteString("AppearanceData");
            pw.WriteDictionary(AppearanceData.Count);

            foreach (var appearance in AppearanceData)
            {
                appearance.Value.Write(pw);
            }

            pw.WriteString("UserName");
            if (FamilyName != null)
            {
                pw.WriteUnicodeString(FamilyName);
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("GameContextId");
            if (GameContextId == 0)
            {
                pw.WriteNoneStruct();
            }
            else
            {
                pw.WriteUInt(GameContextId);
            }

            pw.WriteString("LoginData");
            pw.WriteStruct(LoginData);

            pw.WriteString("ClanData");
            pw.WriteStruct(ClanData);
        }
Esempio n. 2
0
 public void Write(PythonWriter pw)
 {
     pw.WriteTuple(10);
     pw.WriteUnicodeString(Name);
     pw.WriteUInt(MapContextId);
     pw.WriteUInt(ExpPoints);
     pw.WriteInt(ExpLevel);
     pw.WriteUInt(Body);
     pw.WriteUInt(Mind);
     pw.WriteUInt(Spirit);
     pw.WriteUInt(Class);
     pw.WriteUInt(CloneCredits);
     pw.WriteInt((int)RaceId);
 }
Esempio n. 3
0
        public override void Write(PythonWriter pw)
        {
            pw.WriteTuple(5);
            pw.WriteUnicodeString(FamilyName);
            pw.WriteBool(HasCharacters);
            pw.WriteUInt(UserId);

            pw.WriteTuple(EnabledRaceList.Count);

            foreach (var race in EnabledRaceList)
            {
                pw.WriteInt((int)race);
            }

            pw.WriteBool(CanSkipBootcamp);
        }
Esempio n. 4
0
 public override void Write(PythonWriter pw)
 {
     pw.WriteTuple(1);
     pw.WriteUnicodeString(Name);
 }
Esempio n. 5
0
 public void Write(PythonWriter pw)
 {
     pw.WriteTuple(2);
     pw.WriteUInt(Id);
     pw.WriteUnicodeString(Name);
 }
Esempio n. 6
0
        public override void Write(PythonWriter pw)
        {
            pw.WriteTuple(1);
            pw.WriteDictionary(9);

            pw.WriteString("SlotId");
            pw.WriteUInt(SlotId);

            pw.WriteString("IsSelected");
            pw.WriteInt(SlotId == 0 ? 1 : 0);

            pw.WriteString("BodyData");
            if (BodyData != null && !_empty)
            {
                pw.WriteTuple(2);
                pw.WriteInt(BodyData.GenderClassId);
                pw.WriteDouble(BodyData.Scale);
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("CharacterData");
            if (CharacterData != null && !_empty)
            {
                pw.WriteTuple(10); // TODO
                pw.WriteUnicodeString("CharName");
                pw.WriteInt(1);    // pos
                pw.WriteInt(41);   // xpptrs
                pw.WriteInt(10);   // xplvl
                pw.WriteInt(111);  // body
                pw.WriteInt(12);   //mind
                pw.WriteInt(21);   // spirit
                pw.WriteInt(2);    // class id
                pw.WriteInt(3);    // clone credits
                pw.WriteInt(3);    // raceId
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("AppearanceData");
            if (AppearanceData != null && !_empty)
            {
                // TODO
                var count = 0;
                for (var i = 0; i < 21; ++i)
                {
                    if (true) // TODO:
                    {
                        ++count;
                    }
                }

                pw.WriteDictionary(count);

                for (var i = 0; i < 21; ++i)
                {
                    if (true)
                    {
                        pw.WriteInt(i + 1); // equipment slot id
                        pw.WriteTuple(2);
                        pw.WriteInt(0);     // classId

                        pw.WriteTuple(4);
                        pw.WriteInt(0); // hueR
                        pw.WriteInt(0); // hueG
                        pw.WriteInt(0); // hueB
                        pw.WriteInt(0); // hueA
                    }// TODO: else nonstruct?
                }
            }
            else
            {
                pw.WriteTuple(0);
            }

            pw.WriteString("UserName");
            if (UserName != null && !_empty)
            {
                pw.WriteUnicodeString(UserName);
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("GameContextId");
            if (!_empty)
            {
                pw.WriteInt(GameContextId);
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("LoginData");
            if (LoginData != null && !_empty)
            {
                pw.WriteTuple(3);
                pw.WriteInt(0); // num logins
                pw.WriteInt(0); // total time played
                pw.WriteInt(0); // time since last played
            }
            else
            {
                pw.WriteNoneStruct();
            }

            pw.WriteString("ClanData");
            if (ClanData != null && !_empty)
            {
                pw.WriteTuple(2);
                pw.WriteInt(0);                     // clan id
                pw.WriteUnicodeString("Clan name"); // clan name
            }
            else
            {
                pw.WriteNoneStruct();
            }
        }
Esempio n. 7
0
 public override void Write(PythonWriter pw)
 {
     pw.WriteTuple(2);
     pw.WriteInt(SlotNum);
     pw.WriteUnicodeString(FamilyName);
 }
Esempio n. 8
0
 public void Write(PythonWriter pw)
 {
     pw.WriteTuple(2);
     pw.WriteUInt((uint)OptionId);
     pw.WriteUnicodeString(Value);
 }