zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Helper/TestHelper.cs

36 lines
944 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
namespace ET
{
public static class TestHelper
{
2022-11-26 23:20:12 +08:00
private static bool _;
2021-04-08 20:09:59 +08:00
public static async ETTask<string> Execute(Unit unit, string chatContent)
{
try
{
2022-11-26 23:20:12 +08:00
2021-04-11 19:50:39 +08:00
string[] arr = chatContent.Split('/');
2021-04-08 20:09:59 +08:00
if (chatContent.StartsWith("strength"))
{
if (int.TryParse(arr[1], out int index))
{
2022-11-26 23:20:12 +08:00
(string, bool) ret = await ItemComponent.Instance.StrangeEquip(unit, index,-1);
2021-04-08 20:09:59 +08:00
if (ret.Item1 != null)
{
return ret.Item1;
}
}
}
}
catch (Exception e)
{
Log.Error(e);
}
return null;
}
}
}