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(); 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; } } }