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()); }
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()); }