private void RecieveMailItem( byte slot, bool bAllSlot = false) { List<body2_CS_POST_ITEM_RECEIVE> itemReceiveBodys = new List<body2_CS_POST_ITEM_RECEIVE>(); itemReceiveBodys.Add( new body2_CS_POST_ITEM_RECEIVE( readMailInfo.nPostSerial)); body1_CS_POST_ITEM_RECEIVE itemReceive = new body1_CS_POST_ITEM_RECEIVE( slot, itemReceiveBodys.ToArray()); byte[] data = itemReceive.ClassToPacketBytes(); AsNetworkMessageHandler.Instance.Send( data); if( true == bAllSlot) { readMailInfo.sRecievItem1.nOverlapped = 0; readMailInfo.sRecievItem2.nOverlapped = 0; readMailInfo.sRecievItem3.nOverlapped = 0; readMailInfo.sRecievItem4.nOverlapped = 0; } else { switch( slot) { case 0: readMailInfo.sRecievItem1.nOverlapped = 0; break; case 1: readMailInfo.sRecievItem2.nOverlapped = 0; break; case 2: readMailInfo.sRecievItem3.nOverlapped = 0; break; case 3: readMailInfo.sRecievItem4.nOverlapped = 0; break; } } }
void _receiveItemsConfirm() { int count = selectedPostSerials.Count; if( 0 == count) return; if( GetItemCountSelected() > ItemMgr.HadItemManagement.Inven.GetEmptyInvenSlotCount()) { AsMessageBox msgBox = AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(126), AsTableManager.Instance.GetTbl_String(103), AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE); msgBox.SetOkText( AsTableManager.Instance.GetTbl_String(1152)); return; } List<body2_CS_POST_ITEM_RECEIVE> bodies = new List<body2_CS_POST_ITEM_RECEIVE>(); for( int i = 0; i < count; i++) { bodies.Add( new body2_CS_POST_ITEM_RECEIVE( selectedPostSerials[i])); } body1_CS_POST_ITEM_RECEIVE itemReceive = new body1_CS_POST_ITEM_RECEIVE( (Byte)( ePOST_COMMON.ePOST_MAX_ITEM), bodies.ToArray()); byte[] data = itemReceive.ClassToPacketBytes(); AsNetworkMessageHandler.Instance.Send( data); }