コード例 #1
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        case PacketOpcode.Evt_Login__CharacterSet_ID: {
            Login__CharacterSet message = Login__CharacterSet.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Login__WorldInfo_ID: {
            WorldInfo message = WorldInfo.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.PLAYER_DESCRIPTION_EVENT:
        {
            PlayerDescription message = PlayerDescription.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }