mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Added completed quest sendback.
This commit is contained in:
@@ -176,11 +176,17 @@ namespace Meteor.Common
|
||||
srcShiftIndx = 0;
|
||||
destByteIndx++;
|
||||
i += 8;
|
||||
continue;
|
||||
}
|
||||
|
||||
bool val = (Data[srcByteIndx] & (1 << srcShiftIndx)) != 0;
|
||||
bool val = (Data[srcByteIndx] & (1 << srcShiftIndx++)) != 0;
|
||||
|
||||
curByte |= (byte)((val ? 1 : 0) << destShiftIndx++);
|
||||
if (srcShiftIndx == 8)
|
||||
{
|
||||
srcShiftIndx = 0;
|
||||
srcByteIndx++;
|
||||
}
|
||||
if (destShiftIndx == 8)
|
||||
{
|
||||
toReturn[destByteIndx++] = curByte;
|
||||
|
@@ -245,7 +245,7 @@ namespace Meteor.Common
|
||||
{
|
||||
for (var bitCount = 0; bitCount < 8; bitCount++)
|
||||
{
|
||||
if (i + bitCount >= array.Length)
|
||||
if (i + bitCount >= array.Length - 1)
|
||||
break;
|
||||
data[dataCounter] = (byte)(((array[i + bitCount] ? 1 : 0) << 7 - bitCount) | data[dataCounter]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user