调整部分数据表配置,优化 SpriteCache 功能
This commit is contained in:
@@ -8,7 +8,7 @@ namespace SepCore.UI
|
||||
{
|
||||
public class GoodsItemContext : UIContext
|
||||
{
|
||||
public string Title;
|
||||
public string Name;
|
||||
public Rarity Rarity;
|
||||
public Sprite Icon;
|
||||
public ItemType ItemType;
|
||||
@@ -17,7 +17,7 @@ namespace SepCore.UI
|
||||
|
||||
public GoodsItemContext()
|
||||
{
|
||||
Title = string.Empty;
|
||||
Name = string.Empty;
|
||||
Description = string.Empty;
|
||||
Rarity = Rarity.White;
|
||||
Price = 0;
|
||||
@@ -29,7 +29,7 @@ namespace SepCore.UI
|
||||
{
|
||||
if (rawData == null)
|
||||
{
|
||||
Title = string.Empty;
|
||||
Name = string.Empty;
|
||||
Description = string.Empty;
|
||||
Rarity = Rarity.White;
|
||||
Price = 0;
|
||||
@@ -45,25 +45,25 @@ namespace SepCore.UI
|
||||
if (rawData.DataRow == null)
|
||||
{
|
||||
Icon = null;
|
||||
Title = string.Empty;
|
||||
Name = string.Empty;
|
||||
}
|
||||
else if (ItemType == ItemType.Weapon)
|
||||
{
|
||||
if (rawData.DataRow is WeaponConfig weaponConfig)
|
||||
{
|
||||
Title = weaponConfig.Name;
|
||||
Name = weaponConfig.WeaponType.ToString();
|
||||
Description = ItemDescUtility.CreateWeaponDescription(weaponConfig);
|
||||
}
|
||||
else if (rawData.DataRow is WeaponData weaponData)
|
||||
{
|
||||
Title = weaponData.Title;
|
||||
Name = weaponData.Title;
|
||||
Description = ItemDescUtility.CreateWeaponDescription(weaponData);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var prop = (PropConfig)rawData.DataRow;
|
||||
Title = prop.Title;
|
||||
Name = prop.Name;
|
||||
Description = ItemDescUtility.CreatePropDescription(prop.Modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user