Пример #1
0
        public static AdminRestoreCharacter read(BinaryReader binaryReader)
        {
            AdminRestoreCharacter newObj = new AdminRestoreCharacter();

            newObj.iid = binaryReader.ReadUInt32();
            newObj.i_restoredCharName = PStringChar.read(binaryReader);
            newObj.i_acctToRestoreTo  = PStringChar.read(binaryReader);
            return(newObj);
        }
Пример #2
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        case PacketOpcode.CLIENT_REQUEST_ENTER_GAME_EVENT:
        case PacketOpcode.Evt_Admin__GetServerVersion_ID: {
            EmptyMessage message = new EmptyMessage(opcode);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

        // TODO: CHARACTER_PREVIEW_EVENT
        case PacketOpcode.CHARACTER_DELETE_EVENT: {
            CharacterDelete message = CharacterDelete.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

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

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

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

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

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }