-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Using SteamGameCoordinator to send EGCItemMg.k_EMsgGCUnlockCrate, the sending code is as follows, but no MessageCallback was received after sending.
public void sendUnlockCrate(long crateId, long keyId) {
ClientGCMsg<ClientToGCUnlockCrateRequest> unlockCrate = new ClientGCMsg<>(ClientToGCUnlockCrateRequest.class);
Field bodyField = ReflectUtil.getField(ClientGCMsg.class, "body");
bodyField.setAccessible(true);
ClientToGCUnlockCrateRequest body = null;
body = (ClientToGCUnlockCrateRequest) bodyField.get(unlockCrate);
body.setCrateId(crateId).setKeyId(keyId);
steamGameCoordinator.send(unlockCrate, 730);
}@Accessors(chain = true)
public class ClientToGCUnlockCrateRequest implements IGCSerializableMessage {
@Setter
private long crateId;
@Setter
private long keyId;
public void serialize(OutputStream outputStream) throws IOException {
BinaryWriter writer = new BinaryWriter(outputStream);
writer.writeLong(keyId);
writer.writeLong(crateId);
}
public void deserialize(InputStream inputStream) throws IOException {
}
public int getEMsg() {
return EGCItemMg.k_EMsgGCUnlockCrate;
}
}Metadata
Metadata
Assignees
Labels
No labels