public static void putInteger(TssSdk.OutputUnityBuffer data, uint value) { data.write((byte)(value >> 24)); data.write((byte)(value >> 16)); data.write((byte)(value >> 8)); data.write((byte)value); }
public static void putLength(TssSdk.OutputUnityBuffer data, uint length) { data.write((byte)(length >> 24)); data.write((byte)(length >> 16)); data.write((byte)(length >> 8)); data.write((byte)length); }
public static void putByteArray(TssSdk.OutputUnityBuffer data, byte[] value) { int num = value.Length; for (int i = 0; i < num; i++) { data.write(value[i]); } data.write(0); }
public static void setGameStatus(TssSdk.EGAMESTATUS gameStatus) { TssSdk.OutputUnityBuffer outputUnityBuffer = new TssSdk.OutputUnityBuffer(15u); outputUnityBuffer.write(1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 1u); outputUnityBuffer.write(3); outputUnityBuffer.write(3); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 4u); TssSdk.SerializeUnity.putInteger(outputUnityBuffer, (uint)gameStatus); TssSdk.tss_unity_str(outputUnityBuffer.toByteArray(), outputUnityBuffer.getLength()); }
public static void setInitInfo(uint gameId) { TssSdk.OutputUnityBuffer outputUnityBuffer = new TssSdk.OutputUnityBuffer(15u); outputUnityBuffer.write(1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 1u); outputUnityBuffer.write(1); outputUnityBuffer.write(2); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 4u); TssSdk.SerializeUnity.putInteger(outputUnityBuffer, gameId); TssSdk.tss_unity_str(outputUnityBuffer.toByteArray(), outputUnityBuffer.getLength()); }
public static void setUserInfoEx(TssSdk.EENTRYID entryId, string uin, string appId, uint worldId, string roleId) { byte[] bytes = Encoding.ASCII.GetBytes(uin); byte[] bytes2 = Encoding.ASCII.GetBytes(appId); byte[] bytes3 = Encoding.ASCII.GetBytes(roleId); TssSdk.OutputUnityBuffer outputUnityBuffer = new TssSdk.OutputUnityBuffer((uint)(39 + bytes.Length + 1 + bytes2.Length + 1 + bytes3.Length + 1)); outputUnityBuffer.write(1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 1u); outputUnityBuffer.write(2); outputUnityBuffer.write(4); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 4u); TssSdk.SerializeUnity.putInteger(outputUnityBuffer, (uint)entryId); outputUnityBuffer.write(66); uint length = (uint)(bytes.Length + 1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, length); TssSdk.SerializeUnity.putByteArray(outputUnityBuffer, bytes); outputUnityBuffer.write(65); length = (uint)(bytes2.Length + 1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, length); TssSdk.SerializeUnity.putByteArray(outputUnityBuffer, bytes2); outputUnityBuffer.write(5); TssSdk.SerializeUnity.putLength(outputUnityBuffer, 4u); TssSdk.SerializeUnity.putInteger(outputUnityBuffer, worldId); outputUnityBuffer.write(67); length = (uint)(bytes3.Length + 1); TssSdk.SerializeUnity.putLength(outputUnityBuffer, length); TssSdk.SerializeUnity.putByteArray(outputUnityBuffer, bytes3); TssSdk.tss_unity_str(outputUnityBuffer.toByteArray(), outputUnityBuffer.getLength()); }