41 lines
1.3 KiB
C#
41 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PCInfoStatmgrCard_Stats_Data
|
|
{
|
|
public eStat Stat;
|
|
public double val;
|
|
}
|
|
|
|
public class PCInfoStatMgrCard_Stats : uScrollViewMgr
|
|
{
|
|
List<PCInfoStatmgrCard_Stats_Data> list = new List<PCInfoStatmgrCard_Stats_Data>();
|
|
|
|
public void Set(eStat stat, int val)
|
|
{
|
|
list.Clear();
|
|
|
|
Dictionary<eStat, float> dic = null;
|
|
switch (stat)
|
|
{
|
|
case eStat.STR: dic = MyValue.dic_MainStatMultiplier[eMainStatType.STR]; break;
|
|
case eStat.DEX: dic = MyValue.dic_MainStatMultiplier[eMainStatType.DEX]; break;
|
|
case eStat.INT: dic = MyValue.dic_MainStatMultiplier[eMainStatType.INT]; break;
|
|
case eStat.LUK: dic = MyValue.dic_MainStatMultiplier[eMainStatType.LUCK]; break;
|
|
}
|
|
|
|
var classData = table_classconfig.Ins.Get_Data_orNull(ServerInfo.Ins.m_ServerData.Get_EqiupmentEquip(eItem.PC));
|
|
foreach (var item in dic)
|
|
{
|
|
if (item.Key == eStat.ATK)
|
|
{
|
|
if (classData.Get_MainStatToStat() != stat)
|
|
continue;
|
|
}
|
|
list.Add(new PCInfoStatmgrCard_Stats_Data { Stat = item.Key, val = val * dic[item.Key] });
|
|
}
|
|
|
|
Set_ScrollView(list);
|
|
}
|
|
} |