Example #1
0
 public void SetPlantSeedResult(bool success, int objId, int index, CSEntity entity)
 {
     if (success)
     {
         if (m_Entity == entity)
         {
             ItemObject item    = ItemMgr.Instance.Get(objId);
             ItemObject oldItem = m_SeedsGrids[index].m_Grid.ItemObj;
             CSUI_Grid  UIgrid  = m_SeedsGrids[index];
             UIgrid.m_Grid.SetItem(item);
             if (UIgrid.OnItemChanged != null)
             {
                 UIgrid.OnItemChanged(item, oldItem, UIgrid.m_Index);
             }
         }
     }
 }
Example #2
0
 public void FetchToolResult(bool success, int index, CSEntity entity)
 {
     if (success)
     {
         if (m_Entity == entity)
         {
             ItemObject item    = null;
             ItemObject oldItem = m_ToolsGrids[index].m_Grid.ItemObj;
             CSUI_Grid  UIgrid  = m_ToolsGrids[index];
             GameUI.Instance.mItemPackageCtrl.ResetItem();
             UIgrid.m_Grid.SetItem(item);
             if (UIgrid.OnItemChanged != null)
             {
                 UIgrid.OnItemChanged(item, oldItem, UIgrid.m_Index);
             }
         }
     }
 }