DON'T POST STUPID ANSWERS! I REALLY WANT HELP!
For handle the new effects into client its a value with 128bits now...
so like a friend (pro4ever) said, i builded the BigInteger class with some search help heh
and now i'm getting a problem while trying to set it to a bitarray... so i would ask some help with it...
Let's check the codes.
The BitInteger class start with a string value like:
Code:
BigInteger Test = new BigInteger(Update.Flags.Cyclone.ToString(), 16);
so to build the bitarray i'm doing this:
Code:
public byte[] BuildBytes()
{
int Bits = Count();
int Bytes = Bits >> 3;
if ((Bits & 0x7) != 0)
Bytes++;
byte[] result = new byte[Bytes];
int pos = 0;
uint tempVal, val = data[dataLength - 1];
if ((tempVal = (val >> 24 & 0xFF)) != 0)
result[pos++] = (byte)tempVal;
if ((tempVal = (val >> 16 & 0xFF)) != 0)
result[pos++] = (byte)tempVal;
if ((tempVal = (val >> 8 & 0xFF)) != 0)
result[pos++] = (byte)tempVal;
if ((tempVal = (val & 0xFF)) != 0)
result[pos++] = (byte)tempVal;
for (int i = dataLength - 2; i >= 0; i--, pos += 4)
{
val = data[i];
result[pos + 3] = (byte)(val & 0xFF);
val >>= 8;
result[pos + 2] = (byte)(val & 0xFF);
val >>= 8;
result[pos + 1] = (byte)(val & 0xFF);
val >>= 8;
result[pos] = (byte)(val & 0xFF);
}
return result;
}
i'm sending the cyclone status effect as a string , and when i try to set it to bit array, i'm getting the wrong value..... its returning 14303186 as Cyclone Flag....
Thanks in advance!






