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

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

        switch (opcode)
        {
        case PacketOpcode.INVENTORY_PUT_OBJ_IN_CONTAINER_EVENT:     //0x0022
        {
            PutObjectInContainerEvent message = PutObjectInContainerEvent.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.INVENTORY_WIELD_OBJ_EVENT:     // 0x0023
        {
            WieldItem message = WieldItem.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        case PacketOpcode.INVENTORY_REMOVE_OBJ_EVENT:     // 0x0024
        {
            RemoveObject message = RemoveObject.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

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

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

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

        case PacketOpcode.CLOSE_GROUND_CONTAINER_EVENT:     // 0x0052
        {
            CloseGroundContainer message = CloseGroundContainer.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

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

        case PacketOpcode.INVENTORY_SERVER_SAYS_FAILED_EVENT:     // 0x00A0
        {
            InventoryServerSaysFailed message = InventoryServerSaysFailed.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

        case PacketOpcode.VIEW_CONTENTS_EVENT:     // 0x0196
        {
            ViewContents message = ViewContents.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

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

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

        case PacketOpcode.INVENTORY_PUT_OBJ_IN_3D_EVENT:     // 0x019A
        {
            InventoryPutObjIn3D message = InventoryPutObjIn3D.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }
示例#2
0
    public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView)
    {
        bool handled = true;

        PacketOpcode opcode = Util.readOpcode(messageDataReader);

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

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

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

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

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

        // TODO: Evt_Inventory__CommenceViewingContents_ID
        case PacketOpcode.Evt_Inventory__StackableMerge_ID: {
            StackableMerge message = StackableMerge.read(messageDataReader);
            message.contributeToTreeView(outputTreeView);
            break;
        }

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

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

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

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

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

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

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

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

        default: {
            handled = false;
            break;
        }
        }

        return(handled);
    }