34 lines
891 B
C#
Executable File
34 lines
891 B
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace ET
|
|
{
|
|
public static class TestHelper
|
|
{
|
|
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);
|
|
if (ret.Item1 != null)
|
|
{
|
|
return ret.Item1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Log.Error(e);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|