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; }
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; }
public BackgroundMessage(uint ResourceID) : base(MessageTypeGameMode.Background) { this.ResourceID = new ResourceIDBGF(ResourceID); }
public UserCommandGuildShieldList(ResourceIDBGF[] ShieldResources) { this.ShieldResources = ShieldResources; }