Example #1
0
        public static SetSquelchDB read(BinaryReader binaryReader)
        {
            var newObj = new SetSquelchDB();

            // Note: Even if the user applies a squelch to an account using the ModifyAccountSquelch message (0x0059) it does not appear
            // in this account squelch info section but rather in the character squelch info section of the server response which comes next.
            // It appears based on pcaps that the account squelch info will always be 0 and therefore will not need to be unpacked.
            newObj.account_num_buckets   = binaryReader.ReadUInt16();
            newObj.account_table_size    = binaryReader.ReadUInt16();
            newObj.character_num_buckets = binaryReader.ReadUInt16();
            newObj.character_table_size  = binaryReader.ReadUInt16();
            for (int i = 0; i < newObj.character_num_buckets; i++)
            {
                newObj.character_list.Add(CharacterHash.read(binaryReader));
            }
            newObj.global_squelch = SquelchInfo.read(binaryReader);
            return(newObj);
        }
Example #2
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        case PacketOpcode.Evt_Communication__Talk_ID:     // 0x0015
        {
            var message = Talk.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__PopUpString_ID:     // 0x0004
        {
            var message = PopUpString.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__SetAFKMode_ID:     // 0x000F
        {
            var message = SetAFKMode.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__SetAFKMessage_ID:     // 0x0010
        {
            var message = SetAFKMessage.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__TalkDirect_ID:     // 0x0032
        {
            var message = TalkDirect.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__ModifyCharacterSquelch_ID:     // 0x0058
        {
            var message = ModifyCharacterSquelch.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__ModifyAccountSquelch_ID:     // 0x0059
        {
            var message = ModifyAccountSquelch.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__ModifyGlobalSquelch_ID:     // 0x005B
        {
            var message = ModifyGlobalSquelch.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__TalkDirectByName_ID:     // 0x005D
        {
            var message = TalkDirectByName.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__ChannelBroadcast_ID:     // 0x0147
        {
            var message = ChannelBroadcast.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__SetSquelchDB_ID:     // 0x01F4
        {
            var message = SetSquelchDB.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__Emote_ID:     // 0x01DF
        {
            var message = Emote.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__HearEmote_ID:     // 0x01E0
        {
            var message = HearEmote.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__SoulEmote_ID:     // 0x01E1
        {
            var message = SoulEmote.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__HearSoulEmote_ID:     // 0x01E2
        {
            var message = HearSoulEmote.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__Recv_ChatRoomTracker_ID:     // 0x0295
        {
            var message = Recv_ChatRoomTracker.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__WeenieError_ID:     // 0x028A
        {
            WeenieError message = WeenieError.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__WeenieErrorWithString_ID:     // 0x028B
        {
            WeenieErrorWithString message = WeenieErrorWithString.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__HearSpeech_ID:     // 0x02BB
        {
            var message = HearSpeech.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__HearRangedSpeech_ID:     // 0x02BC
        {
            var message = HearRangedSpeech.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__HearDirectSpeech_ID:     // 0x2BD
        {
            var message = HearDirectSpeech.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__TransientString_ID:     // 0x2EB
        {
            var message = TransientString.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.Evt_Communication__TextboxString_ID:     // 0xF7E0
        {
            var message = TextBoxString.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }