/// <summary> /// 结束技能,切入break阶段 /// </summary> /// <param name="obj"></param> private void OnStopSkillResult(IComponentEvent obj) { StopSkillResult result = obj as StopSkillResult; if (result == null) { return; } if (SkillID != result.skillId) { return; } Leyoutech.Utility.DebugUtility.LogWarning("技能", string.Format("停止技能,由 {0} 状态切入Break ! ", StageType)); StageType = ChangedSkillStageToBreak(); }
/// <summary> /// 执行取消技能 /// </summary> /// <param name="result"></param> private void DisposeStopResult(StopSkill result) { if (result == null) { Leyoutech.Utility.DebugUtility.LogError("技能停止", "服务器下行消息 --- >StopSkill 为null ,服务器检查下 "); return; } BaseEntity entity = GameplayManager.Instance.GetEntityManager().GetEntityById <BaseEntity>(result.CasterId); if (entity == null) { return; } //结束技能 StopSkillResult endResult = new StopSkillResult(); uint skillid = result.SkillId; endResult.skillId = (int)skillid; entity.SendEvent(ComponentEventName.ToStopSkill, endResult); }
/// <summary> /// 处理技能break /// </summary> private static void DisposeStopSkill(StopSkill result) { BaseEntity entity = GameplayManager.Instance.GetEntityManager().GetEntityById <BaseEntity>(result.CasterId); if (entity == null) { return; } if (entity.GetCurrSkillId() < 0 || entity.GetCurrSkillId() != (int)result.SkillId) //小于0 则不再释放中 { return; } Leyoutech.Utility.DebugUtility.LogWarning("广播技能", string.Format("处理技能break, SkillId = {0}", result.SkillId)); //结束技能 StopSkillResult endResult = new StopSkillResult(); uint skillid = result.SkillId; endResult.skillId = (int)skillid; entity.SendEvent(ComponentEventName.ToStopSkill, endResult); }