void SendSellItemsToSever() { SoundManager.Instance.PlaySoundEffect("Sound_Button_Equipment_Confirm"); Dictionary <byte, byte> sellItemList = new Dictionary <byte, byte>(); //Key:位置,Value:数量 foreach (var child in ChacheItemList) { sellItemList.Add((byte)child.sSyncContainerGoods_SC.nPlace, SellItemNum == 0?child.sSyncContainerGoods_SC.byNum:(byte)SellItemNum); } sellItemList.ApplyAllItem(P => TraceUtil.Log(SystemModel.Jiang, "SellItem:Place:" + P.Key + ",Num:" + P.Value)); SMsgContainerDoff_CS sellItemMsg = new SMsgContainerDoff_CS() { dwSrcContainerID_Heard = ChacheItemList[0].sSyncContainerGoods_SC.SMsgContainerCSCHead.dwContainerID, dwSrcContainerID = ChacheItemList[0].sSyncContainerGoods_SC.SMsgContainerCSCHead.dwContainerID, bySrcPlaceNum = (byte)ChacheItemList.Count, sellItemList = sellItemList, }; NetServiceManager.Instance.ContainerService.SendContainerDoff(sellItemMsg); }
/// <summary> /// 发送丢弃物品请求 /// </summary> public void SendContainerDoff(SMsgContainerDoff_CS dataStruct) { Package pkg = dataStruct.GeneratePackage(MasterMsgType.NET_ROOT_CONTAINER, ContainerDefineManager.MSG_CONTAINER_DOFF); this.Request(pkg); }