public void apply(int peekTick, CSVCMsg_GameEvent message, Match match) {
HandlerHelper.traceMessage(log, peekTick, message);
GameEventDescriptor desc = match.getGameEventDescriptors().forId(message.getEventid());
GameEvent e = new GameEvent(desc);
for (int i = 0; i < message.getKeysCount(); i++) {
key_t key = message.getKeys(i);
Object value = null;
switch(key.getType()) {
case 1:
value = key.getValString();
break;
case 2:
value = key.getValFloat();
break;
case 3:
value = key.getValLong();
break;
case 4:
value = key.getValShort();
break;
case 5:
value = key.getValByte();
break;
case 6:
value = key.getValBool();
break;
case 7:
value = key.getValUint64();
break;
default:
throw new RuntimeException("cannot handle game event key type " + key.getType());
}
e.set(i, value);
}
log.debug(e.toString());
match.getGameEvents().add(e);