34 lines
977 B
C#
Executable File
34 lines
977 B
C#
Executable File
using Cal.DataTable;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace ET
|
|
{
|
|
public class LearnSkillGoodsEffect : GoodsEffect
|
|
{
|
|
public override string Init(Unit unit, GoodsBase goodsBase,bool isLock =false)
|
|
{
|
|
base.unit = unit;
|
|
GoodsBase = goodsBase;
|
|
return Run();
|
|
}
|
|
private string Run()
|
|
{
|
|
UnitSkillComponent unitSkillComponent = unit.GetComponent<UnitSkillComponent>();
|
|
string ret = unitSkillComponent.LearnSkill(GoodsBase.CommonIncrease / 100, GoodsBase.CommonIncrease % 100);
|
|
if (!ret.Equals(string.Empty))
|
|
{
|
|
return ret;
|
|
}
|
|
Game.EventSystem.Publish(new EventType.ChangeBattleCharacter { unit = unit }).Coroutine();
|
|
return string.Empty;
|
|
}
|
|
public override async ETVoid Execute()
|
|
{
|
|
|
|
await ETTask.CompletedTask;
|
|
}
|
|
}
|
|
}
|