|
@@ -7,6 +7,7 @@
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
using FairyGUI;
|
|
using FairyGUI;
|
|
using FL.Data;
|
|
using FL.Data;
|
|
|
|
+using FL.Data.Items;
|
|
using XGame;
|
|
using XGame;
|
|
using XGame.Database;
|
|
using XGame.Database;
|
|
using XGame.Framework.Database;
|
|
using XGame.Framework.Database;
|
|
@@ -36,12 +37,12 @@ namespace FL.FGUI
|
|
private void RemoveUIListenres() { }
|
|
private void RemoveUIListenres() { }
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
- private int _id;
|
|
|
|
|
|
+ private int _sbId;
|
|
|
|
|
|
public void ShowUI(int id)
|
|
public void ShowUI(int id)
|
|
{
|
|
{
|
|
- _id = id;
|
|
|
|
- if (_id == 0)
|
|
|
|
|
|
+ _sbId = id;
|
|
|
|
+ if (_sbId == 0)
|
|
{
|
|
{
|
|
VM.IsEmpty.selectedIndex = 1;
|
|
VM.IsEmpty.selectedIndex = 1;
|
|
return;
|
|
return;
|
|
@@ -50,25 +51,43 @@ namespace FL.FGUI
|
|
{
|
|
{
|
|
VM.IsEmpty.selectedIndex = 0;
|
|
VM.IsEmpty.selectedIndex = 0;
|
|
}
|
|
}
|
|
- var table = PartnerTableRepo.Get(_id);
|
|
|
|
|
|
+ var table = PartnerTableRepo.Get(_sbId);
|
|
if (table == null)
|
|
if (table == null)
|
|
{
|
|
{
|
|
- Log.Error($"圣兵表不存在,id:{_id}");
|
|
|
|
|
|
+ Log.Error($"圣兵表不存在,id:{_sbId}");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- var attr = PartnersData.Instance.GetPartnerAttrByTableId(_id);
|
|
|
|
|
|
+ VM.NameLabel.text = table.Name;
|
|
|
|
+ var attr = PartnersData.Instance.GetPartnerAttrByTableId(_sbId);
|
|
var level = attr?.Level ?? 1;
|
|
var level = attr?.Level ?? 1;
|
|
var star = attr?.RisingStarLv ?? 1;
|
|
var star = attr?.RisingStarLv ?? 1;
|
|
- var upLevelTable = partnerStarUpTableRepo.GetPartnerStarTable(_id, star);
|
|
|
|
|
|
+ var upLevelTable = partnerStarUpTableRepo.GetPartnerStarTable(_sbId, star);
|
|
if (upLevelTable == null)
|
|
if (upLevelTable == null)
|
|
{
|
|
{
|
|
- Log.Error($"圣兵升星表不存在,id:{_id},level:{level}");
|
|
|
|
|
|
+ Log.Error($"圣兵升星表不存在,id:{_sbId},level:{level}");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//
|
|
//
|
|
VM.SpPbar.max = upLevelTable.StarUpCost;
|
|
VM.SpPbar.max = upLevelTable.StarUpCost;
|
|
VM.SpPbar.value = ItemData.Instance.GetItemNum(upLevelTable.PetId);
|
|
VM.SpPbar.value = ItemData.Instance.GetItemNum(upLevelTable.PetId);
|
|
//
|
|
//
|
|
|
|
+ ShowStar(star);
|
|
|
|
+ //
|
|
|
|
+ ShowSkillBaseInfo(table.Skill[0]);
|
|
|
|
+ //
|
|
|
|
+ ShowAttr(level);
|
|
|
|
+ //
|
|
|
|
+ VM.ElementLoader.url = AddressableDefine.SbElementType(((int)table.Element));
|
|
|
|
+ VM.TypeLoader.url = AddressableDefine.SbTypeIcon(table.Type);
|
|
|
|
+ //
|
|
|
|
+ VM.AttrLabel.text = $"+{table.Own_attr[1]/100f}%";
|
|
|
|
+ var item = new Item();
|
|
|
|
+ //item.Init(table, table.Id);
|
|
|
|
+ //VM.ItemBase.Ctrl.ShowUI()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void ShowStar(int star)
|
|
|
|
+ {
|
|
var starStep = PartnersService.Instance.GetStarStep(star);
|
|
var starStep = PartnersService.Instance.GetStarStep(star);
|
|
var starLv = PartnersService.Instance.GetStarLv(star);
|
|
var starLv = PartnersService.Instance.GetStarLv(star);
|
|
var list = new List<int>();
|
|
var list = new List<int>();
|
|
@@ -77,14 +96,14 @@ namespace FL.FGUI
|
|
list.Add(starStep);
|
|
list.Add(starStep);
|
|
}
|
|
}
|
|
VM.StarList.BindDatas(list);
|
|
VM.StarList.BindDatas(list);
|
|
- //
|
|
|
|
- VM.NameLabel.text = table.Name;
|
|
|
|
- ShowSkillBaseInfo(table.Skill[0]);
|
|
|
|
- //
|
|
|
|
- var lvTable = partnerLvUpTableRepo.GetPartnerLvUpTable(_id, level);
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void ShowAttr(int level)
|
|
|
|
+ {
|
|
|
|
+ var lvTable = partnerLvUpTableRepo.GetPartnerLvUpTable(_sbId, level);
|
|
if (lvTable == null)
|
|
if (lvTable == null)
|
|
{
|
|
{
|
|
- Log.Error($"圣兵等级不存在,id:{_id},level:{level}");
|
|
|
|
|
|
+ Log.Error($"圣兵等级不存在,id:{_sbId},level:{level}");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
var atkVal = lvTable.LvAttr[1];
|
|
var atkVal = lvTable.LvAttr[1];
|
|
@@ -96,8 +115,6 @@ namespace FL.FGUI
|
|
atkSpeed > 0 ? TableUtils.ToRealDouble(atkSpeed).ToString("F1") : "0";
|
|
atkSpeed > 0 ? TableUtils.ToRealDouble(atkSpeed).ToString("F1") : "0";
|
|
VM.SpeedValLabel.text = descSpeed;
|
|
VM.SpeedValLabel.text = descSpeed;
|
|
//VM.ItemBase.Ctrl.ShowUI()
|
|
//VM.ItemBase.Ctrl.ShowUI()
|
|
- VM.ElementLoader.url = AddressableDefine.SbElementType(((int)table.Element));
|
|
|
|
- VM.TypeLoader.url = AddressableDefine.SbTypeIcon(table.Type);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|