Exemplo n.º 1
0
        public override bool TakeAction()
        {
            CountryCombat countryCombat = new CountryCombat(ContextUser);

            _countryUserList = countryCombat.GetCountryUser(_countryID, _lv);
            _countryUserList = _countryUserList.GetPaging(_pageIndex, _pageSize, out _pageCount);
            return(true);
        }
Exemplo n.º 2
0
        public override bool TakeAction()
        {
            if (ContextUser.CountryID == CountryType.None)
            {
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St5201_NoJoinCountry;
                return(false);
            }
            CountryCombat countryCombat = new CountryCombat(ContextUser);

            if (countryCombat.GameActive == null ||
                countryCombat.GameActive.RefreshStatus() == CombatStatus.NoStart ||
                countryCombat.GameActive.RefreshStatus() == CombatStatus.Over)
            {
                if (ContextUser.UserStatus == UserStatus.CountryCombat)
                {
                    ContextUser.UserStatus = UserStatus.Normal;
                    //ContextUser.Update();
                }
                ErrorCode = LanguageManager.GetLang().ErrorCode;
                ErrorInfo = LanguageManager.GetLang().St5201_CombatNoStart;
                return(false);
            }
            //wuzf 检查战斗状态
            if (ContextUser.UserStatus != UserStatus.CountryCombat || UserHelper.IsUserEmbattle(ContextUser.UserID, ContextUser.UseMagicID))
            {
                countryCombat.Exit();
                //ErrorCode = LanguageManager.GetLang().ErrorCode;
                //ErrorInfo = LanguageManager.GetLang().St5201_NoJoinCountry;
                //return false;
            }

            if (ops == 1)
            {
                processList = countryCombat.GetCombatProcess(true);
            }
            else if (ops == 2)
            {
                processList = countryCombat.GetCombatProcess(false);
            }
            coldTime    = countryCombat.GameActive.ColdTime;
            countryUser = countryCombat.GetCountryUser();
            firstUser   = CountryCombat.FistCountryUser ?? new CountryUser();
            CountryGroup mogemaGroup;
            CountryGroup hashideGroup;

            if (CountryCombat.TryGroup(CountryType.M, out mogemaGroup) && CountryCombat.TryGroup(CountryType.H, out hashideGroup))
            {
                _mscoreNum = mogemaGroup.Score;
                _hscoreNum = hashideGroup.Score;
            }
            if (coldTime == 0)
            {
            }
            return(true);
        }