Exemple #1
0
    [Execute]////登录时服务器下发玩家所有刷星数据
    public void Execute(GameCmd.stUserStarDataScriptUserCmd_S cmd)
    {
        TaskDataManager mgr = DataManager.Manager <TaskDataManager>();

        for (int i = 0; i < cmd.all_star.Count; i++)
        {
            mgr.AddStarTask(new StarTaskData()
            {
                id           = cmd.all_star[i].id,
                star         = cmd.all_star[i].star,
                all_refresh  = cmd.all_star[i].all_refresh,
                gold_refresh = cmd.all_star[i].gold_refresh,
            });
        }
    }
Exemple #2
0
    [Execute]////服务器返回星数据 通知客户端打开刷星界面
    public void Execute(GameCmd.stRefreshStarScriptUserCmd_S cmd)
    {
        TaskDataManager mgr = DataManager.Manager <TaskDataManager>();

        mgr.AddStarTask(new StarTaskData()
        {
            id           = cmd.star.id,
            star         = cmd.star.star,
            all_refresh  = cmd.star.all_refresh,
            gold_refresh = cmd.star.gold_refresh,
        });
        if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MissionMessagePanel))
        {
            DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MissionMessagePanel, UIMsgID.eRefreshStarTask, cmd.star.id);
        }
    }