示例#1
0
	//$ yde - 20130207
	public void LockingPStoreSlot( body_SC_PRIVATESHOP_REGISTRATION_ITEM _item)
	{
	}
示例#2
0
	public bool CreateSlotItem( body_SC_PRIVATESHOP_REGISTRATION_ITEM _item, Transform trmParent = null)
	{
		if( null == _item)
		{
			Debug.LogError( "UIPStoreSlot::CreateSlotItem() [ null == _item ]");
			return false;
		}

		return _CreateSlotItem( _item.sPrivateShopItem, _item.nInvenSlot, _item.nItemSellGold, trmParent);
	}
示例#3
0
	void PrivateShop_Registraion_Item( byte[] _packet)
	{
		body_SC_PRIVATESHOP_REGISTRATION_ITEM registration = new body_SC_PRIVATESHOP_REGISTRATION_ITEM();
		registration.PacketBytesToClass( _packet);

		AsPStoreManager.Instance.Recv_Registraion_Item( registration);
	}
示例#4
0
	public void Recv_Registraion_Item(body_SC_PRIVATESHOP_REGISTRATION_ITEM _registration)
	{
		if(_registration.eResult != eRESULTCODE.eRESULT_SUCC)
		{
			Debug.Log(_registration.eResult);
			return;
		}
		
		/*Debug.Log("Recv_Registration_Item: " + 
			_registration.bAddOrDel + ", " + _registration.nInvenSlot + ", " + _registration.nPrivateShopSlot + ", " +
			_registration.sPrivateShopItem.nItemTableIdx + ", " + _registration.sPrivateShopItem.nAttribute);*/
		
		if(_registration.bAddOrDel == true)
		{
			AsHudDlgMgr.Instance.pstoreDlg.SetPStoreItem(_registration);         
			ItemMgr.HadItemManagement.Inven.SetSlotMoveLock(_registration.nInvenSlot, true);
			
			body2_SC_PRIVATESHOP_OWNER_ITEMLIST item = new body2_SC_PRIVATESHOP_OWNER_ITEMLIST();
			item.nInvenSlot = _registration.nInvenSlot;
			item.nItemGold = _registration.nItemSellGold;
			item.nPrivateShopSlot = _registration.nPrivateShopSlot;
			item.sItem = _registration.sPrivateShopItem;
			item.nMaxOverlapped = _registration.sPrivateShopItem.nOverlapped;
			
			if(m_dicPlayerShopItem.ContainsKey(item.nPrivateShopSlot) == true)
				m_dicPlayerShopItem.Remove(item.nPrivateShopSlot);
			
			m_dicPlayerShopItem.Add(item.nPrivateShopSlot, item);
		}
		else
		{
			AsHudDlgMgr.Instance.pstoreDlg.RemovePStoreItem(_registration);
			ItemMgr.HadItemManagement.Inven.SetSlotMoveLock(_registration.nInvenSlot, false);
			
			foreach(KeyValuePair<int, body2_SC_PRIVATESHOP_OWNER_ITEMLIST> pair in m_dicPlayerShopItem)
			{
				if(pair.Value.nPrivateShopSlot == _registration.nPrivateShopSlot)
				{
					Debug.Log("AsPStoreManager::Recv_Registration_Item: item[nPrivateShopSlot(" + _registration.nPrivateShopSlot + ")] in current shop list is deleted.");
					m_dicPlayerShopItem.Remove(pair.Key);
					break;
				}
			}
		}
		
		if( AsHudDlgMgr.Instance.IsOpenInven )
			AsHudDlgMgr.Instance.invenDlg.ApplySlotMoveLock();
	}
示例#5
0
	public void RemovePStoreItem(body_SC_PRIVATESHOP_REGISTRATION_ITEM _item)
	{
		if( ( slots.Count - 1) < _item.nPrivateShopSlot || _item.nPrivateShopSlot < 0)
			return;
		
		slots[_item.nPrivateShopSlot].Clear();
		
		SetRestoreSlot();
	}
示例#6
0
	public void SetPStoreItem(body_SC_PRIVATESHOP_REGISTRATION_ITEM _item)
	{
		if( ( slots.Count - 1) < _item.nPrivateShopSlot || _item.nPrivateShopSlot < 0)
			return;
		
		slots[_item.nPrivateShopSlot].Clear();
		
		if( null != _item)
		{
			slots[_item.nPrivateShopSlot].CreateSlotItem(_item);//, slotItemParent.transform);
		}
	}