public void RecoverSkillSlot(SkillSlotType _slotType) { SkillSlot slot = null; if (this.sourceActor.handle.SkillControl.TryGetSkillSlot(_slotType, out slot)) { if (this.changeSkillSlot[(int)_slotType].changeCount == 1) { int initSkillID = this.changeSkillSlot[(int)_slotType].initSkillID; int curSkillCD = (int)slot.CurSkillCD; int skillLevel = slot.GetSkillLevel(); slot.CancelUseSkill(); this.sourceActor.handle.SkillControl.InitSkillSlot((int)_slotType, initSkillID, 0); if (this.sourceActor.handle.SkillControl.TryGetSkillSlot(_slotType, out slot)) { slot.SetSkillLevel(skillLevel); slot.CurSkillCD = curSkillCD; slot.IsCDReady = curSkillCD == 0; DefaultSkillEventParam param = new DefaultSkillEventParam(_slotType, 0); Singleton <GameSkillEventSys> .GetInstance().SendEvent <DefaultSkillEventParam>(GameSkillEventDef.Event_UpdateSkillUI, this.sourceActor, ref param, GameSkillEventChannel.Channel_HostCtrlActor); } this.changeSkillSlot[(int)_slotType].initSkillID = 0; this.changeSkillSlot[(int)_slotType].changeSkillID = 0; } this.changeSkillSlot[(int)_slotType].changeCount--; } }
public override void FightOver() { base.FightOver(); for (int i = 0; i < 8; i++) { SkillSlot slot = this.SkillSlotArray[i]; if (slot != null) { slot.CancelUseSkill(); } } }