176 lines
3.7 KiB
C#
176 lines
3.7 KiB
C#
![]() |
//------------------------------------------------------------------------------
|
|||
|
// <auto-generated>
|
|||
|
// This code was generated by a tool.
|
|||
|
//
|
|||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|||
|
// the code is regenerated.
|
|||
|
// </auto-generated>
|
|||
|
//------------------------------------------------------------------------------
|
|||
|
|
|||
|
namespace G
|
|||
|
{
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using CodeStage.AntiCheat.ObscuredTypes;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Generated from: home.xlsx
|
|||
|
/// </summary>
|
|||
|
public partial class ItemBeautySkill
|
|||
|
{
|
|||
|
private ObscuredInt _grade;
|
|||
|
|
|||
|
public int grade
|
|||
|
{
|
|||
|
get { return _grade; }
|
|||
|
set
|
|||
|
{
|
|||
|
_grade = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public int maxGrade
|
|||
|
{
|
|||
|
get => maxLevel;
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public bool isMax
|
|||
|
{
|
|||
|
get { return _grade >= maxLevel; }
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
public Item.ItemInfo upgradeCost
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return new Item.ItemInfo
|
|||
|
{
|
|||
|
id = addCost[0],
|
|||
|
count = addCost[1] + (_grade - 1) * addCost[2],
|
|||
|
};
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
/// <param name="results"></param>
|
|||
|
public void GetAttributes(List<CombatAttribute> results)
|
|||
|
{
|
|||
|
int count = addValue.Length / 3;
|
|||
|
for (int i = 0; i < count; i++)
|
|||
|
{
|
|||
|
int index = i * 3;
|
|||
|
results.Add(new CombatAttribute
|
|||
|
{
|
|||
|
id = (CombatAttributeId)addValue[index],
|
|||
|
value = _grade > 0 ? addValue[index + 1] + (_grade - 1) * addValue[index + 2] : addValue[index + 1]
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void GetAttributes(List<CombatAttribute> results, int attributeId)
|
|||
|
{
|
|||
|
int count = addValue.Length / 3;
|
|||
|
for (int i = 0; i < count; i++)
|
|||
|
{
|
|||
|
int index = i * 3;
|
|||
|
if (attributeId == addValue[index])
|
|||
|
results.Add(new CombatAttribute
|
|||
|
{
|
|||
|
id = (CombatAttributeId)addValue[index],
|
|||
|
value = _grade > 0 ? addValue[index + 1] + (_grade - 1) * addValue[index + 2] : addValue[index + 1]
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
///
|
|||
|
/// </summary>
|
|||
|
/// <param name="results"></param>
|
|||
|
public void GetNextAttributes(List<CombatAttribute> results)
|
|||
|
{
|
|||
|
int count = addValue.Length / 3;
|
|||
|
for (int i = 0; i < count; i++)
|
|||
|
{
|
|||
|
int index = i * 3;
|
|||
|
results.Add(new CombatAttribute
|
|||
|
{
|
|||
|
id = (CombatAttributeId)addValue[index],
|
|||
|
value = _grade > 0 ? addValue[index + 1] + _grade * addValue[index + 2] : addValue[index + 1]
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string currGradeText
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
string result = this.effect;
|
|||
|
var results = F.ListPool<CombatAttribute>.Get();
|
|||
|
GetAttributes(results);
|
|||
|
if (results.Count == 1)
|
|||
|
{
|
|||
|
result = results[0].ToString();
|
|||
|
}
|
|||
|
else if (results.Count == 2)
|
|||
|
{
|
|||
|
result = results[0].ToString() + " " + results[1].ToString();
|
|||
|
}
|
|||
|
F.ListPool<CombatAttribute>.Release(results);
|
|||
|
return result;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string nextGradeText
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
string result = this.effect;
|
|||
|
var results = F.ListPool<CombatAttribute>.Get();
|
|||
|
GetAttributes(results);
|
|||
|
if (results.Count == 1)
|
|||
|
{
|
|||
|
var text = results[0].ToString();
|
|||
|
results.Clear();
|
|||
|
GetNextAttributes(results);
|
|||
|
result = text + $"<color=#349652>↑{results[0].value}</color>";
|
|||
|
}
|
|||
|
else if (results.Count == 2)
|
|||
|
{
|
|||
|
var text = results[0].ToString();
|
|||
|
var text2 = results[1].ToString();
|
|||
|
results.Clear();
|
|||
|
GetNextAttributes(results);
|
|||
|
result = text + $"<color=#349652>↑{results[0].value}</color>" + "\n" +
|
|||
|
text2 + $"<color=#349652>↑{results[1].value}";
|
|||
|
}
|
|||
|
F.ListPool<CombatAttribute>.Release(results);
|
|||
|
return result;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string upgradeText
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return $"{upgradeCost.count} 红颜经验";
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public string unlockText
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return $"亲密度达到{unlock[1]}";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|