/// <summary> /// 处理随机发射点 /// </summary> private void DisposeEmitNodeResult(uint entityId, EmitNode node_info) { if (node_info == null) { Leyoutech.Utility.DebugUtility.LogError("随机发射点", "服务器下行消息 --- >EmitNode 为null ,服务器检查下 "); return; } BaseEntity entity = GameplayManager.Instance.GetEntityManager().GetEntityById <BaseEntity>(entityId); if (entity == null) { return; } Leyoutech.Utility.DebugUtility.LogWarning("随机发射点", string.Format("收到随机发射点entity = {0}, 发射点类型 = {1},indexs = {2} , assign_index = {3}", entityId, (int)node_info.NodeType, string.Join(",", node_info.IndexList), (int)node_info.AssignIndex)); RandomEmitNodeResult nodeResult = new RandomEmitNodeResult(); nodeResult.emitNode = node_info; entity.SendEvent(ComponentEventName.RandomEmitNode, nodeResult); }
/// <summary> /// 前摇技能流监听相应 /// </summary> /// <param name="entityId"></param> /// <param name="skill_id_"></param> /// <param name="message"></param> public void Run_CastSingSkillResponse(uint entityId, uint skill_id_, CastSingSkillResponse message) { CastSingSkillResponse.Types.Success success = message.Success; if (success != null) { CastSkillResult result = success.Success_.Result; EmitNode nodeinfo = success.Success_.NodeInfo; StopSkill stopskill = success.Success_.StopSkill; // 处理是否可以释放的返回结果 if (result != null) { DisposeCastSkillResult(result); } //随机发射点 if (nodeinfo != null) { DisposeEmitNodeResult(entityId, nodeinfo); } // 执行取消技能 if (stopskill != null) { DisposeStopResult(stopskill); } } }
/// <summary> /// 引导技能流监听响应 /// </summary> /// <param name="message"></param> public void Run_CastGuideSkillResponse(uint entityId, CastGuideSkillResponse message) { CastGuideSkillResponse.Types.Success success = message.Success; if (success != null) { CastSkillResult result = success.Success_.Result; EmitNode node_info = success.Success_.NodeInfo; StopSkill stopskill = success.Success_.StopSkill; GuideSkillEndResult guideSkillEndResult = success.Success_.EndResult; ChangeGuideSkillTargetInfoResult changeGuideSkillTargetInfoResult = success.Success_.ChangeResult; Leyoutech.Utility.DebugUtility.Log("SkillRPCNet", " 引导技能流监听响应" + this.GetHashCode()); // 处理是否可以释放的返回结果 if (result != null) { DisposeCastSkillResult(result); } //随机发射点 if (node_info != null) { DisposeEmitNodeResult(entityId, node_info); } // 执行取消技能 if (stopskill != null) { DisposeStopResult(stopskill); } //引导按键抬起,end 阶段 if (guideSkillEndResult != null) { DisposeGuideSkillEndResult(guideSkillEndResult); } //目标改变 if (changeGuideSkillTargetInfoResult != null) { } } }
/// <summary> /// 蓄力技能流监听响应 /// </summary> /// <param name="message"></param> public void Run_CastAccumulationSkillResponse(uint entityId, CastAccumulationSkillResponse message) { CastAccumulationSkillResponse.Types.Success success = message.Success; if (success != null) { CastSkillResult result = success.Success_.Result; AccumulationSkillEndResult end_result = success.Success_.EndResult; EmitNode node_info = success.Success_.NodeInfo; StopSkill stopskill = success.Success_.StopSkill; Leyoutech.Utility.DebugUtility.Log("SkillRPCNet", " 蓄力技能流监听响应" + this.GetHashCode()); // 处理是否可以释放的返回结果 if (result != null) { DisposeCastSkillResult(result); } //处理蓄力按键抬起 if (end_result != null) { DisposeAccumulationSkillEndResult(entityId, end_result); } //随机发射点 if (node_info != null) { DisposeEmitNodeResult(entityId, node_info); } // break 阶段 if (stopskill != null) { DisposeStopResult(stopskill); } } }