コード例 #1
0
        public void Read(PythonReader pr)
        {
            var size = pr.ReadTuple();

            if (size != 4)
            {
                throw new Exception("Invalid Color tuple parameter count!");
            }

            switch (pr.PeekType())
            {
            case PythonType.Int:
                Red   = (byte)pr.ReadInt();
                Green = (byte)pr.ReadInt();
                Blue  = (byte)pr.ReadInt();
                Alpha = (byte)pr.ReadInt();
                break;

            case PythonType.Long:
                Red   = (byte)pr.ReadLong();
                Green = (byte)pr.ReadLong();
                Blue  = (byte)pr.ReadLong();
                Alpha = (byte)pr.ReadLong();
                break;

            default:
                throw new Exception("Invalid peeked type at Color reading!");
            }
        }
コード例 #2
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     pr.ReadTuple();
     Body   = pr.ReadInt();
     Mind   = pr.ReadInt();
     Spirit = pr.ReadInt();
 }
コード例 #3
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     CustomizationActionArgId = pr.ReadInt();
     CustomizationEntityId    = pr.ReadLong();
     SelectedClassTemplateId  = pr.ReadInt();
     pr.ReadNoneStruct();
     pr.ReadNoneStruct();
 }
コード例 #4
0
ファイル: AppearanceData.cs プロジェクト: zaklaus/Rasa.NET
        public void Read(PythonReader pr)
        {
            SlotId = pr.ReadInt();

            pr.ReadTuple();

            ClassId = pr.ReadInt();
            Color   = pr.ReadStruct <Color>();
        }
コード例 #5
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     ListLenght  = pr.ReadList();
     SkillIds    = new int[ListLenght];
     SkillLevels = new int[ListLenght];
     for (var i = 0; i < ListLenght; i++)
     {
         pr.ReadTuple();
         SkillIds[i]    = pr.ReadInt();
         SkillLevels[i] = pr.ReadInt();
     }
 }
コード例 #6
0
 public void Read(PythonReader pr)
 {
     pr.ReadTuple();
     Name         = pr.ReadUnicodeString();
     MapContextId = pr.ReadUInt();
     ExpPoints    = pr.ReadUInt();
     ExpLevel     = (byte)pr.ReadInt();
     Body         = pr.ReadUInt();
     Mind         = pr.ReadUInt();
     Spirit       = pr.ReadUInt();
     Class        = pr.ReadUInt();
     CloneCredits = pr.ReadUInt();
     RaceId       = (Race)pr.ReadInt();
 }
コード例 #7
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     ActionId    = (ActionId)pr.ReadInt();
     ActionArgId = pr.ReadInt();
     Target      = (uint)pr.ReadLong();
     if (pr.PeekType() == PythonType.Int)
     {
         ItemId = pr.ReadInt();
     }
     else
     {
         pr.ReadNoneStruct();
     }
 }
コード例 #8
0
        public override void Read(PythonReader pr)
        {
            pr.ReadTuple();
            FamilyName    = pr.ReadUnicodeString();
            HasCharacters = pr.ReadBool();
            UserId        = (uint)pr.ReadInt();

            var raceCount = pr.ReadTuple();

            for (var i = 0; i < raceCount; ++i)
            {
                EnabledRaceList.Add((Race)pr.ReadInt());
            }

            CanSkipBootcamp = pr.ReadBool();
        }
コード例 #9
0
        public override void Read(PythonReader pr)
        {
            pr.ReadTuple();
            EntityId = pr.ReadUInt();
            ClassId  = (EntityClass)pr.ReadInt();

            // todo
        }
コード例 #10
0
        public override void Read(PythonReader pr)
        {
            pr.ReadTuple();

            SlotNum       = pr.ReadInt();
            FamilyName    = pr.ReadUnicodeString();
            CharacterName = pr.ReadUnicodeString();
            Gender        = pr.ReadInt();
            Scale         = pr.ReadDouble();

            var itemCount = pr.ReadDictionary();

            for (var i = 0; i < itemCount; i++)
            {
                var data = pr.ReadStruct <AppearanceData>();
                AppearanceData.Add(data.SlotId, data);
            }

            RaceId = pr.ReadInt();
        }
コード例 #11
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     if (pr.PeekType() == PythonType.Int)
     {
         TitleId = (uint)pr.ReadInt();
     }
     else
     {
         pr.ReadNoneStruct();
     }
 }
コード例 #12
0
        //public int ItemId { get; set; }   // ToDo check later maybe it's id of item if it's draged into abilityDrawer, not used for skills

        public override void Read(PythonReader pr)
        {
            pr.ReadTuple();
            SlotId = pr.ReadInt();
            if (pr.PeekType() == PythonType.Long)
            {
                AbilityId = pr.ReadLong();
            }
            else
            {
                pr.ReadNoneStruct();
            }

            if (pr.PeekType() == PythonType.Long)
            {
                AbilityLevel = pr.ReadLong();
            }
            else
            {
                pr.ReadNoneStruct();
            }
            pr.ReadNoneStruct();
        }
コード例 #13
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     AbilityDrawerSlot = pr.ReadInt();
 }
コード例 #14
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     FromSlot = (int)pr.ReadLong();
     ToSlot   = pr.ReadInt();
 }
コード例 #15
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     LootLevel = pr.ReadInt();
 }
コード例 #16
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     LangId = pr.ReadInt();
 }
コード例 #17
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     KeepAliveDelay = pr.ReadInt();
 }