Exemple #1
0
    /// <summary>
    /// 处理蓄力抬起
    /// </summary>
    private void DisposeAccumulationSkillEndResult(uint entityId, AccumulationSkillEndResult result)
    {
        if (result == null)
        {
            Leyoutech.Utility.DebugUtility.LogError("蓄力抬起", "服务器下行消息  --- >AccumulationSkillEndResult 为null ,服务器检查下 ");
            return;
        }

        BaseEntity entity = GameplayManager.Instance.GetEntityManager().GetEntityById <BaseEntity>(entityId);

        if (entity == null)
        {
            return;
        }

        if (result.Code)
        {
            //成功
            AccumulationIndexResult accResult = new AccumulationIndexResult();
            accResult.skillId           = (int)result.SkillId;
            accResult.accumulationIndex = (int)result.GroupIndex;
            entity.SendEvent(ComponentEventName.AccumulationIndex, accResult);
        }
        else
        {
            //失败
            EndSkillResult endResult = new EndSkillResult();
            uint           skillid   = result.SkillId;
            endResult.skillId = (int)skillid;
            entity.SendEvent(ComponentEventName.ToEndSkill, endResult);
        }
    }
Exemple #2
0
    /// <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);
            }
        }
    }