CTT/Server/Hotfix/Game/Helper/TestHelper.cs

36 lines
944 B
C#
Executable File

using System;
using System.Collections.Generic;
using System.Linq;
namespace ET
{
public static class TestHelper
{
private static bool _;
public static async ETTask<string> Execute(Unit unit, string chatContent)
{
try
{
string[] arr = chatContent.Split('/');
if (chatContent.StartsWith("strength"))
{
if (int.TryParse(arr[1], out int index))
{
(string, bool) ret = await ItemComponent.Instance.StrangeEquip(unit, index,-1);
if (ret.Item1 != null)
{
return ret.Item1;
}
}
}
}
catch (Exception e)
{
Log.Error(e);
}
return null;
}
}
}