From 04b3034c07f86aad4493f3be4bd26e2094c10d0c Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 20 八月 2018 21:27:24 +0800
Subject: [PATCH] [2614]神兽开发
---
System/Strengthening/GodBeastReinforcementWin.cs | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/System/Strengthening/GodBeastReinforcementWin.cs b/System/Strengthening/GodBeastReinforcementWin.cs
index 9750523..d500c10 100644
--- a/System/Strengthening/GodBeastReinforcementWin.cs
+++ b/System/Strengthening/GodBeastReinforcementWin.cs
@@ -20,6 +20,7 @@
public int GodBeastQuality;//绁炲吔鍝佽川
public int GodBeastStar;//绁炲吔鏄熺骇
public int LocationMarker;//浣嶇疆鏍囪
+ public int EquipScore;//瑁呭璇勫垎
}
public class GodBeastReinforcementWin : Window
{
@@ -30,6 +31,7 @@
DogzModel Dogz_model;
DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
private List<GodBeastClass> GodBeastList = new List<GodBeastClass>();
+ private int CurrentlySelected = 0;
#region Built-in
protected override void BindController()
{
@@ -47,6 +49,7 @@
OnCreateGridLineCell(m_ScrollerController);
if (GodBeastList.Count > 0)
{
+ CurrentlySelected = GodBeastList[0].LocationMarker;
m_ScrollerController.JumpIndex(0);
}
m_GodBeastSlidingList.Init();
@@ -57,8 +60,7 @@
}
protected override void OnPreClose()
- {
- m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ {
m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
}
@@ -85,9 +87,18 @@
godBeastClass.GodBeastPart = itemModel[i].EquipPlace;
godBeastClass.GodBeastQuality = itemModel[i].chinItemModel.ItemColor;
godBeastClass.GodBeastStar = itemModel[i].chinItemModel.StarLevel;
+ godBeastClass.EquipScore = itemModel[i].equipScore;
var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 绁炲吔瑁呭寮哄寲淇℃伅鍒楄〃 [寮哄寲绛夌骇, 寮哄寲鐔熺粌搴
- godBeastClass.GodBeastLv = IudetDogzEquipPlus[0];
- godBeastClass.GodBeasProficiency = IudetDogzEquipPlus[1];
+ if (IudetDogzEquipPlus == null)
+ {
+ godBeastClass.GodBeastLv = 0;
+ godBeastClass.GodBeasProficiency = 0;
+ }
+ else
+ {
+ godBeastClass.GodBeastLv = IudetDogzEquipPlus[0];
+ godBeastClass.GodBeasProficiency = IudetDogzEquipPlus[1];
+ }
godBeastClass.LocationMarker= key*10+ itemModel[i].EquipPlace;
GodBeastList.Add(godBeastClass);
}
@@ -117,6 +128,10 @@
{
return -x.GodBeasProficiency.CompareTo(y.GodBeasProficiency);
}
+ if (x.EquipScore.CompareTo(y.EquipScore) != 0)//瑁呭璇勫垎
+ {
+ return -x.EquipScore.CompareTo(y.EquipScore);
+ }
return 1;
}
void OnCreateGridLineCell(ScrollerController gridCtrl)
@@ -142,6 +157,16 @@
{
GodBeastEntry godBeastEntry = cell.GetComponent<GodBeastEntry>();
int locationMarker = cell.index;
+ godBeastEntry.GetGodBeastLocationMarker(locationMarker, CurrentlySelected);
+ godBeastEntry.GodBeastButton.RemoveAllListeners();
+ godBeastEntry.GodBeastButton.AddListener(()=>
+ {
+ if (locationMarker != CurrentlySelected)
+ {
+ CurrentlySelected = locationMarker;
+ m_ScrollerController.m_Scorller.RefreshActiveCellViews();//鍒锋柊鍙
+ }
+ });
}
}
--
Gitblit v1.8.0