public void Recv_ItemList(body1_SC_PRIVATESHOP_ITEMLIST _list) { m_StoreState = ePStoreState.Another_Opened; Debug.LogWarning("Bug Searching::: AsPStoreManager:: Recv_ItemList: private shop dialog is instantiated"); if( m_SearchDlg == null) { AsHudDlgMgr.Instance.OpenPStore(); AsHudDlgMgr.Instance.pstoreDlg.SetOtherPStoreItem(_list); } }
void PrivateShop_ItemList( byte[] _packet) { body1_SC_PRIVATESHOP_ITEMLIST list = new body1_SC_PRIVATESHOP_ITEMLIST(); list.PacketBytesToClass( _packet); AsPStoreManager.Instance.Recv_ItemList( list); }
public void SetOtherPStoreItem(body1_SC_PRIVATESHOP_ITEMLIST _list) { for(int i=0; i<slotCount_; ++i) { slots[i].SetClosed(); } int firstIdx = int.MaxValue; foreach(body2_SC_PRIVATESHOP_ITEMLIST item in _list.body) { Debug.Log("SetOtherPStoreItem: item = " + item.nPrivateShopSlot); if( ( slots.Count - 1) < item.nPrivateShopSlot || item.nPrivateShopSlot < 0) return; slots[item.nPrivateShopSlot].Clear(); if( null != item) { slots[item.nPrivateShopSlot].CreateSlotItem(item);//, slotItemParent.transform); } if(item.nPrivateShopSlot < firstIdx && item.sItem.nOverlapped > 0) { firstIdx = item.nPrivateShopSlot; } } if(firstIdx != int.MaxValue) { float unit_Y = 3.2f; float total = slotCount_; float length = ((unit_Y * total) + (0.01f * (total - 1)) - scrollList.viewableArea.y); float curPos = (firstIdx * unit_Y) / length; if(curPos > 1) curPos = 1; scrollList.ScrollListTo(curPos); } }