From 2f00b1ffbdda2df24f43ad94030f43b55e397c7b Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 22 十月 2018 17:50:59 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/OpenServerActivity/PoolItemCell.cs |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/System/OpenServerActivity/PoolItemCell.cs b/System/OpenServerActivity/PoolItemCell.cs
index 27f33de..182dfba 100644
--- a/System/OpenServerActivity/PoolItemCell.cs
+++ b/System/OpenServerActivity/PoolItemCell.cs
@@ -4,39 +4,36 @@
 
 namespace Snxxz.UI
 {
-    public class PoolItemCell : MonoBehaviour,IDragHandler,IDropHandler
+    public class PoolItemCell : MonoBehaviour,IDragHandler
     {
         [SerializeField] CommonItemBaisc itemBaisc;
         [SerializeField] GameObject bestIconObj;
         
         ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
         WishingPoolModel wishingModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
-        int itemId = 0;
+        int index = -1;
+
         public void OnDrag(PointerEventData eventData)
         {
-            Debug.Log("鎷栨嫿寮�濮�");
             wishingModel.isDraging = true;
-            wishingModel.dragItemId = itemId;
+            wishingModel.dragIndex = index;
         }
-
-        public void OnDrop(PointerEventData eventData)
+      
+        public void Display(int index)
         {
-            Debug.Log("鎷栨嫿缁撴潫");
-            wishingModel.ResetDragData();
-        }
-
-        public void Display(int itemId)
-        {
-            this.itemId = itemId;
+            this.index = index;
+            WishingPoolModel.WishingWellItem wellItem = null;
+            bool isPoolData = wishingModel.TryGetPoolDataByIndex(index,out wellItem);
             bestIconObj.SetActive(false);
-            ItemCellModel cellModel = new ItemCellModel(itemId);
+            ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount,wellItem.isBind);
             itemBaisc.Init(cellModel);
             itemBaisc.cellBtn.RemoveAllListeners();
             itemBaisc.cellBtn.AddListener(()=>
             {
-                ItemAttrData attrData = new ItemAttrData(itemId);
+                ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount, -1,wellItem.isBind);
                 tipsModel.SetItemTipsModel(attrData);
             });
         }
+
     }
 }

--
Gitblit v1.8.0