private void SetSlotsInSlot( AsSlot _slot, int iBeginIndex, sQUICKSLOT[] qucikSlots, int i) { if( iBeginIndex+i >= qucikSlots.Length ) { Debug.LogError("AsQuickSlotManager SetSlotsInSlot array index overflow![" + (iBeginIndex+i).ToString() + "]"); return; } sQUICKSLOT _quickSlot = qucikSlots[ iBeginIndex + i]; if( (int)eQUICKSLOT_TYPE.eQUICKSLOT_TYPE_ITEM == _quickSlot.eType) { if( _quickSlot.nValue == 0) _slot.SetEmpty(); else _slot.SetItem( _quickSlot.nValue); } else if( (int)eQUICKSLOT_TYPE.eQUICKSLOT_TYPE_SKILL == _quickSlot.eType) { if( _quickSlot.nValue == 0) { _slot.SetEmpty(); } else if( SkillBook.Instance.dicCurSkill.ContainsKey(_quickSlot.nValue) ) { SkillView _skill = SkillBook.Instance.dicCurSkill[_quickSlot.nValue]; _slot.SetSkill( _skill.nSkillTableIdx, _skill.nSkillLevel); } } else { _slot.SetEmpty(); } }
private void SetSlotItem( AsSlot _slot, UIInvenSlot _InvenSlot) { if( true == _InvenSlot.slotItem.realItem.item.ItemData.isTradeLimit || true == _InvenSlot.slotItem.realItem.item.ItemData.isDump || false == _InvenSlot.slotItem.realItem.sItem.IsTradeEnable() ) { AsNotify.Instance.MessageBox( AsTableManager.Instance.GetTbl_String(109), AsTableManager.Instance.GetTbl_String(29), null, null, AsNotify.MSG_BOX_TYPE.MBT_OK, AsNotify.MSG_BOX_ICON.MBI_NOTICE); return; } if( 1 < _InvenSlot.slotItem.realItem.sItem.nOverlapped) { if( true == AsHudDlgMgr.Instance.IsOpenInven) { m_curSlotUseOpenDlg = _slot; AsHudDlgMgr.Instance.invenDlg.OpenRemoveItemDlg( _InvenSlot.slotItem.realItem.getSlot, _InvenSlot.slotItem.realItem.sItem.nOverlapped, UIRemoveItemDlg.eDLG_TYPE.POSTBOX); } return; } else { if( true == _slot.IsEnableItem ) { ItemMgr.HadItemManagement.Inven.SetSlotMoveLock( _slot.getRealItem.getSlot, false); } _slot.SetType( AsSlot.SLOT_TYPE.SLT_IT_POST ); _slot.SetItem( _InvenSlot.slotItem.realItem, 1); ItemMgr.HadItemManagement.Inven.SetSlotMoveLock( _InvenSlot.slotItem.realItem.getSlot, true); textSendCost.Text = _GetPostCost().ToString( "#,#0", CultureInfo.InvariantCulture); AsSoundManager.Instance.PlaySound( _InvenSlot.slotItem.realItem.item.ItemData.getStrDropSound, Vector3.zero, false); return; } }