Package com.dota2.proto

Examples of com.dota2.proto.Usermessages$CUserMsg_TrainOrBuilder


                    } else if (message instanceof CDemoSendTables) {
                        es = CodedInputStream.newInstance(((CDemoSendTables) message).getData().toByteArray());
                        state = State.EMBED;
                        continue;
                    } else if (message instanceof CDemoFullPacket) {
                        CDemoFullPacket fullMessage = (CDemoFullPacket)message;
                        es = CodedInputStream.newInstance(fullMessage.getPacket().getData().toByteArray());
                        state = State.EMBED;
                        full = true;
                        if (!isFiltered(CDemoStringTables.class)) {
                            return genPeek(fullMessage.getStringTable());
                        }
                    } else if (!isFiltered(message.getClass())) {
                        return genPeek(message);
                    }
                    continue;
View Full Code Here


    public void apply(int peekTick, CSVCMsg_GameEventList message, Match match) {
        HandlerHelper.traceMessage(log, peekTick, message);
        for (descriptor_t d : message.getDescriptorsList()) {
            String[] keys = new String[d.getKeysCount()];
            for (int i = 0; i < d.getKeysCount(); i++) {
                key_t k = d.getKeys(i);
                keys[i] = k.getName();
            }
            match.getGameEventDescriptors().add(new GameEventDescriptor(
                d.getEventid(),
                d.getName(),
                keys
View Full Code Here

    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);
View Full Code Here

                        if (!isFiltered(CNETMsg_Tick.class)) {
                            return genPeek(subMessage);
                        }
                    } else if (subMessage instanceof CSVCMsg_UserMessage) {
                        if (!isFiltered(CSVCMsg_UserMessage.class)) {
                            CSVCMsg_UserMessage userMessage = (CSVCMsg_UserMessage) subMessage;
                            Class<? extends GeneratedMessage> umClazz = PacketTypes.USERMSG.get(userMessage.getMsgType());
                            if (umClazz == null) {
                                log.warn("unknown usermessage of kind {}", userMessage.getMsgType());
                                continue;
                            } else if (!isFiltered(umClazz)) {
                                return genPeek(PacketTypes.parse(umClazz, userMessage.getMsgData().toByteArray()));
                            }
                        }
                    } else if (!isFiltered(subMessage.getClass())) {
                        return genPeek(subMessage);
                    }
View Full Code Here

TOP

Related Classes of com.dota2.proto.Usermessages$CUserMsg_TrainOrBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.