Exemple #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!");
            }
        }
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     CustomizationActionArgId = pr.ReadInt();
     CustomizationEntityId    = pr.ReadLong();
     SelectedClassTemplateId  = pr.ReadInt();
     pr.ReadNoneStruct();
     pr.ReadNoneStruct();
 }
Exemple #3
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();
        }
 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();
     }
 }
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     EntityId = pr.ReadLong();
 }
Exemple #6
0
 public override void Read(PythonReader pr)
 {
     pr.ReadTuple();
     FromSlot = (int)pr.ReadLong();
     ToSlot   = pr.ReadInt();
 }