public int  OnNotifySkillInfo(NotifySkillInfo pMsg)
    {
        UInt64 targetID     = pMsg.guid;
        float  timeInSecond = pMsg.time / 1000.0f;  //状态持续的时间毫秒数
        float  timeMax      = pMsg.cooldown / 1000.0f;
        Player entity;

        PlayersManager.Instance.PlayerDic.TryGetValue(targetID, out entity);
        if (entity == null)
        {
            return((int)ErrorCodeEnum.Normal);
        }
        ;
        if (entity.GameObjGUID == pMsg.guid)
        {
            entity.mIsSkillCD = true;
            entity.SetSkillCD(timeInSecond);
        }

        EventCenter.Broadcast((Int32)GameEventEnum.UserEvent_NotifyGameObjectReleaseSkillState, pMsg);
        return((int)ErrorCodeEnum.Normal);
    }
Example #2
0
 public int  OnNotifySkillInfo(NotifySkillInfo pMsg)
 {
     EventCenter.Broadcast((Int32)GameEventEnum.UserEvent_NotifySkillInfo, pMsg);
     return((int)EErrorCode.eNormal);
 }