Beispiel #1
0
    //public bool IsExistsFinishItem()
    //{
    //    //判断当前成就了是否有已经完成 待领取的成就
    //    return m_IsExistsFinishAction;
    //}
    //public void SetExistsFinishItem(bool States)
    //{
    //    if (m_IsExistsFinishAction != States)
    //    {
    //        m_IsExistsFinishAction = States;
    //        //发送事件
    //        tagActionFinishStatesChagneEvent pEvent = new tagActionFinishStatesChagneEvent();
    //        MsgEventHandle.HandleMsg(pEvent);
    //    }
    //    else
    //        m_IsExistsFinishAction = States;
    //}
    //private void CheckIsExistsFinishItem()
    //{
    //    if (m_ActionMap.Count == 0)
    //        SetExistsFinishItem(false);
    //    else
    //    {
    //        foreach (RoleActionBase var in m_ActionMap.Values)
    //        {
    //            foreach (tagActionEventConfig var2 in var.pConfig.EventMap.Values)
    //            {
    //                if (IsCanFinishAction(var.pConfig.ActionID, var2.ID))
    //                {
    //                    SetExistsFinishItem(true);
    //                    return;
    //                }
    //            }
    //        }
    //        SetExistsFinishItem(false);
    //    }
    //}
    public void ResetInfo()
    {
        OnClear();
        tagActionChangeEvent pEvent = new tagActionChangeEvent();

        MsgEventHandle.HandleMsg(pEvent);
    }
Beispiel #2
0
    bool HandleGetRoleActionInfo(NetCmdBase obj)
    {
        LC_Cmd_GetRoleActionInfo ncb = (LC_Cmd_GetRoleActionInfo)obj;

        if ((ncb.States & FishDataInfo.MsgBegin) != 0)
        {
            m_ActionMap.Clear();
        }
        for (UInt16 i = 0; i < ncb.Sum; ++i)
        {
            tagActionConfig pConfig = null;
            if (!FishConfig.Instance.m_ActionInfo.m_ActionMap.TryGetValue(ncb.Array[i].ActionID, out pConfig))
            {
                continue;
            }
            RoleActionBase pBase = CreateAction((EventTargetType)pConfig.EventID);
            if (pBase == null || !pBase.OnInit(ncb.Array[i], this))
            {
                continue;
            }
            m_ActionMap.Add(ncb.Array[i].ActionID, pBase);
        }
        if ((ncb.States & FishDataInfo.MsgEnd) != 0)
        {
            m_IsLoadInfo = true;
            tagActionChangeEvent pEvent = new tagActionChangeEvent();
            MsgEventHandle.HandleMsg(pEvent);
        }
        return(true);
    }