Exemplo n.º 1
0
        public override bool TakeAction()
        {
            var plotTeam = new PlotTeamCombat(ContextUser);

            moreTeam = plotTeam.GetTeam(teamID);
            return(true);
        }
Exemplo n.º 2
0
        public override bool TakeAction()
        {
            var          plotTeam = new PlotTeamCombat(ContextUser);
            MorePlotTeam moreTeam = plotTeam.GetTeam(teamID);

            if (moreTeam != null && moreTeam.UserList.Count <= 1)
            {
                this.ErrorCode = LanguageManager.GetLang().ErrorCode;
                this.ErrorInfo = LanguageManager.GetLang().St4210_PeopleNotEnough;
                return(false);
            }

            PlotInfo plotInfo = new ConfigCacheSet <PlotInfo>().FindKey(plotID);

            if (plotInfo == null)
            {
                this.ErrorCode = LanguageManager.GetLang().ErrorCode;
                this.ErrorInfo = LanguageManager.GetLang().St4210_PlotNotEnough;
                return(false);
            }

            if (!plotTeam.DoStart(teamID))
            {
                this.ErrorCode = LanguageManager.GetLang().ErrorCode;
                return(false);
            }

            return(true);
        }
Exemplo n.º 3
0
        public override bool TakeAction()
        {
            if (!PlotTeamCombat.IsMorePlotDate(ContextUser.UserID, funEnum))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St4202_OutMorePlotDate;
                return(false);
            }
            CombatHelper.RemoveDailyMorePlot(ContextUser.UserID, funEnum); //清空副本次数
            var plotTeam = new PlotTeamCombat(ContextUser);

            if (!string.IsNullOrEmpty(plotTeam.ToString()))
            {
                if (funEnum == FunctionEnum.Multiplot)
                {
                    morePlotArray = plotTeam.ToTeamList();
                }
                else
                {
                    morePlotArray = plotTeam.ToMoreTeamList();
                }
            }

            return(true);
        }
Exemplo n.º 4
0
        public override bool TakeAction()
        {
            if (!PlotTeamCombat.IsMorePlotDate(ContextUser.UserID, funEnum))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St4202_OutMorePlotDate;
                return(false);
            }
            if (UserHelper.IsBeiBaoFull(ContextUser))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St1107_GridNumFull;
                return(false);
            }
            var plotTeam = new PlotTeamCombat(ContextUser);

            teamID = plotTeam.GetTeamId(Uid);
            if (teamID != -1)
            {
                return(true);
            }
            if (!plotTeam.CreateTeam(plotID, out teamID))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                return(false);
            }
            return(true);
        }
Exemplo n.º 5
0
        public override bool TakeAction()
        {
            if (!PlotTeamCombat.IsMorePlotDate(ContextUser.UserID, funEnum))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St4202_OutMorePlotDate;
                return(false);
            }
            if (UserHelper.IsBeiBaoFull(ContextUser))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St1107_GridNumFull;
                return(false);
            }
            var plotTeam = new PlotTeamCombat(ContextUser);
            var team     = plotTeam.GetTeam(teamID);

            if (team != null)
            {
                if (team.Status == 2)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotStart;
                    return(false);
                }
                if (team.Status == 3)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St4206_TeamPlotLead;
                    return(false);
                }
            }
            if (ops == 1)
            {
                plotTeam.AddTeam(teamID);
            }
            else if (ops == 2)
            {
                if (funEnum == FunctionEnum.Multiplot)
                {
                    plotTeam.AddTeam(out teamID);
                }
                else
                {
                    plotTeam.AddMoreTeam(out teamID);
                }
                if (teamID == -1)
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    ErrorInfo = LanguageManager.GetLang().St4206_NoTeam;
                    return(false);
                }
            }

            return(true);
        }
Exemplo n.º 6
0
        public override bool TakeAction()
        {
            var plotTeam = new PlotTeamCombat(ContextUser);
            int teamId   = plotTeam.GetTeamId(Uid);

            if (teamId != -1)
            {
                var team = plotTeam.GetTeam(teamId);
                if (!team.TeamUser.UserId.Equals(Uid))
                {
                    ErrorCode = LanguageManager.GetLang().ErrorCode;
                    return(false);
                }
                plotTeam.MoveTeamPos(teamId, toUser, IsUp == 1);
            }
            return(true);
        }
Exemplo n.º 7
0
        public override bool TakeAction()
        {
            var plotTeam = new PlotTeamCombat(ContextUser);
            var team     = plotTeam.GetTeam(teamID);

            if (team.Status == 2)
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St4208_IsCombating;
                return(false);
            }
            if (!plotTeam.LeaveTeam(teamID))
            {
                //ErrorCode = LanguageManager.GetLang().ErrorCode;
                //return false;
            }
            return(true);
        }
Exemplo n.º 8
0
        public override bool TakeAction()
        {
            var plotTeam = new PlotTeamCombat(ContextUser);
            var team     = plotTeam.GetTeam(teamID);

            if (!plotTeam.IsInTeam())
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St4211_UserNotAddTeam;
                return(false);
            }

            if (!plotTeam.SendOutMember(teamID, toUser))
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                return(false);
            }

            return(true);
        }
Exemplo n.º 9
0
        public override bool TakeAction()
        {
            var plotTeam = new PlotTeamCombat(ContextUser);

            teamCombatResult = plotTeam.GetCombatProcess(teamID);
            teamPlot         = plotTeam.GetTeam(teamID);
            plotInfo         = new ConfigCacheSet <PlotInfo>().FindKey(plotID);

            if (teamCombatResult.IsWin)
            {
                //日常任务-多人副本
                TaskHelper.TriggerDailyTask(Uid, 4007);

                if (ContextUser.UserExtend != null && ContextUser.UserExtend.DailyInfo != null)
                {
                    if (ContextUser.UserExtend.DailyInfo.RefreshDate.Date == DateTime.Now.Date)
                    {
                        ContextUser.UserExtend.DailyInfo.MoreNum = MathUtils.Addition(ContextUser.UserExtend.DailyInfo.MoreNum, 1);
                    }
                    else
                    {
                        ContextUser.UserExtend.DailyInfo.RefreshDate = DateTime.Now;
                        ContextUser.UserExtend.DailyInfo.MoreNum     = 1;
                    }
                }
                else if (ContextUser.UserExtend != null)
                {
                    DailyRefresh dailyRefresh = new DailyRefresh();
                    dailyRefresh.RefreshDate         = DateTime.Now;
                    dailyRefresh.MoreNum             = 1;
                    ContextUser.UserExtend.DailyInfo = dailyRefresh;
                }
                //ContextUser.Update();
            }

            return(true);
        }