예제 #1
0
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            ResourceID = new ResourceIDBGF(Buffer, cursor);
            cursor += ResourceID.ByteLength;

            return cursor - StartIndex;
        }
예제 #2
0
        protected virtual void HandleBackgroundMessage(BackgroundMessage Message)
        {
            ResourceIDBGF resource = Message.ResourceID;

            resource.ResolveResources(resourceManager, false);

            if (resource.Resource != null)
            {
                resource.Resource.DecompressAll();
            }
        }
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            ResourceID = new ResourceIDBGF(Buffer, cursor);
            cursor    += ResourceID.ByteLength;

            return(cursor - StartIndex);
        }
        public override int ReadFrom(byte[] Buffer, int StartIndex=0)
        {
            int cursor = StartIndex;

            if ((UserCommandType)Buffer[cursor] != CommandType)
                throw new Exception(ERRORWRONGTYPEBYTE);
            else
            {
                cursor++;

                ushort len = BitConverter.ToUInt16(Buffer, cursor);
                cursor += TypeSizes.SHORT;

                ShieldResources = new ResourceIDBGF[len];
                for (int i = 0; i < len; i++)
                {
                    ShieldResources[i] = new ResourceIDBGF(Buffer, cursor);
                    cursor += ShieldResources[i].ByteLength;
                }
            }

            return cursor - StartIndex;
        }        
예제 #5
0
 public BackgroundMessage(uint ResourceID) 
     : base(MessageTypeGameMode.Background)
 {
     this.ResourceID = new ResourceIDBGF(ResourceID);      
 }
 public UserCommandGuildShieldList(ResourceIDBGF[] ShieldResources)
 {
     this.ShieldResources = ShieldResources;
 }
 public BackgroundMessage(uint ResourceID)
     : base(MessageTypeGameMode.Background)
 {
     this.ResourceID = new ResourceIDBGF(ResourceID);
 }