Упростить всегда есть что:
servers = Struct.AddByte("Count Server");
for (i = 0; i < servers; i++)
{
Struct.StartNode("Server");
Struct.AddInt("Available"); // Это не Id
Struct.AddInt("Ip"); // Совсем забыл за IP, добавлю позже AddIP :)
Struct.AddShort("Port");
Struct.AddByte("Type");
Struct.AddShort("Max Count Player");
Struct.AddInt("Online");
Struct.StartNode("Channels");
for (j = 0; j < 10; j++)
{
Struct.AddByte("Type");
}
Struct.EndNode(true); // Каналы true - раскрыто
Struct.EndNode(false); // Сервер false - свёрнуто
}
Code: C#
Текст, если не Unicode:
length = Struct.AddShort("ShopUrl Length");
Struct.AddPaddedString("ShopUrl", length);
Code: C#