mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-07 22:59:14 +08:00
Fix mail item name issue
This commit is contained in:
parent
97bc9d8f6a
commit
2a3100c822
@ -60,8 +60,9 @@ namespace GrasscutterTools.Game
|
||||
|
||||
public int Count => Ids.Length;
|
||||
|
||||
public string this[int id] => IdMap.TryGetValue(id, out string name) ? name : "???";
|
||||
public string this[int id] => IdMap.TryGetValue(id, out string name) ? name : EmptyName;
|
||||
|
||||
public static string EmptyName = "???";
|
||||
//public int this[string name] => NameMap[name];
|
||||
|
||||
public int[] Ids { get; }
|
||||
|
@ -22,12 +22,17 @@
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var name = GameData.Items[ItemId];
|
||||
if (name == ItemMap.EmptyName)
|
||||
name = GameData.Weapons[ItemId];
|
||||
if (name == ItemMap.EmptyName)
|
||||
name = GameData.Artifacts[ItemId];
|
||||
if (ItemLevel > 1)
|
||||
return $"{ItemId}:{GameData.Items[ItemId]} x{ItemCount} lv{ItemLevel}";
|
||||
return $"{ItemId}:{name} x{ItemCount} lv{ItemLevel}";
|
||||
else if (ItemCount > 1)
|
||||
return $"{ItemId}:{GameData.Items[ItemId]} x{ItemCount}";
|
||||
return $"{ItemId}:{name} x{ItemCount}";
|
||||
else
|
||||
return $"{ItemId}:{GameData.Items[ItemId]}";
|
||||
return $"{ItemId}:{name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user