Exemple #1
0
        /// <summary>
        /// 整理背包按钮
        /// </summary>
        /// <param name="obj"></param>
        public void OnResetContainerBtnClick(object obj)
        {
            OnShowItemTypeButtonClick(ShowItemBtnType.All);
            UIEventManager.Instance.TriggerUIEvent(UIEventType.ResetDragComponentStatus, null);
            SoundManager.Instance.PlaySoundEffect("Sound_Button_PackageArrangement");
            var ContainerListInfo           = ContainerInfomanager.Instance.sBuildContainerClientContexts.First(P => P.dwContainerName == 2);
            SMsgContainerTidy_CS dataStruct = new SMsgContainerTidy_CS();

            dataStruct.dwContainerID1 = ContainerListInfo.dwContainerID;
            dataStruct.dwContainerID2 = ContainerListInfo.dwContainerID;
            NetServiceManager.Instance.ContainerService.SendContainerTidy(dataStruct);
        }
Exemple #2
0
        //public void ReplaceItem(DragComponent oldItem,DragComponent newItem)
        //{
        //    var removeItemSlot = ContainerBoxList.First(P => P.MyContainerBox == dragComponent as SingleContainerBox);
        //    removeItemSlot.ClearUpItem();
        //    removeItemSlot.OnTouchSlot();
        //}

        /// <summary>
        /// 重置背包按钮
        /// </summary>
        /// <param name="obj"></param>
        public void OnResetContainerBtnClick(object obj)
        {
            UIEventManager.Instance.TriggerUIEvent(UIEventType.ResetDragComponentStatus, null);
            SoundManager.Instance.PlaySoundEffect("Sound_Button_Default");
            var ContainerListInfo           = ContainerInfomanager.Instance.sBuildContainerClientContexts.First(P => P.dwContainerName == 2);
            SMsgContainerTidy_CS dataStruct = new SMsgContainerTidy_CS();

            dataStruct.dwContainerID1 = ContainerListInfo.dwContainerID;
            dataStruct.dwContainerID2 = ContainerListInfo.dwContainerID;
            NetServiceManager.Instance.ContainerService.SendContainerTidy(dataStruct);
            CurrentPageNumber = 1;
            OnLastBtnClick(null);
            //print("整理背包!容器ID:" + ContainerListInfo.dwContainerID);
        }
Exemple #3
0
    /// <summary>
    /// 发送背包整理请求
    /// </summary>
    public void SendContainerTidy(SMsgContainerTidy_CS dataStruct)
    {
        Package pkg = dataStruct.GeneratePackage(MasterMsgType.NET_ROOT_CONTAINER, ContainerDefineManager.MSG_CONTAINER_TIDY);

        this.Request(pkg);
    }