This commit is contained in:
Putoo
2026-07-08 19:13:55 +08:00
parent 5d0ebe5077
commit fe2696074b
59 changed files with 1448 additions and 112 deletions

View File

@@ -4,6 +4,31 @@ namespace Application.Domain;
public class GameTool
{
/// <summary>
/// 单位转换
/// </summary>
/// <param name="glod"></param>
/// <returns></returns>
public static string ConvertCopperName(long glod)
{
string result = string.Empty;
string glodStr = glod.ToString();
int yin = 0;
int t = 0;
if (glodStr.Length > 3)
{
yin = Convert.ToInt32(glodStr.Substring(0, glodStr.Length - 3));
t = Convert.ToInt32(glodStr.Substring(glodStr.Length - 3, 3));
}
else
{
t = Convert.ToInt32(glod);
}
result += yin > 0 ? string.Format("{0}银", yin) : "";
result += t > 0 ? string.Format("{0}铜", t) : "";
result = string.IsNullOrEmpty(result) ? "0铜" : result;
return result;
}
/// <summary>
/// 获取等级基础属性
/// </summary>