Exemplo n.º 1
0
        protected static uint CheckSingleConditionForDailyActive(GameClient client, int DailyActiveMinID, int DailyActiveMaxID, long roleCurrentValue, string strCheckField, out bool bIsCompleted)
        {
            bIsCompleted = false;
            SystemXmlItem itemDailyActive = null;
            uint          needMinValue    = 0U;

            for (int DailyActiveID = DailyActiveMinID; DailyActiveID <= DailyActiveMaxID; DailyActiveID++)
            {
                if (DailyActiveManager.CheckLevCondition(client, DailyActiveID))
                {
                    if (GameManager.systemDailyActiveInfo.SystemXmlItemDict.TryGetValue(DailyActiveID, out itemDailyActive))
                    {
                        if (null != itemDailyActive)
                        {
                            needMinValue = (uint)itemDailyActive.GetIntValue(strCheckField, -1);
                            if (roleCurrentValue < (long)((ulong)needMinValue))
                            {
                                break;
                            }
                            if (!DailyActiveManager.IsDailyActiveCompleted(client, DailyActiveID))
                            {
                                DailyActiveManager.AddDailyActivePoints(client, DailyActiveID, itemDailyActive, true);
                                DailyActiveManager.OnDailyActiveCompleted(client, DailyActiveID);
                                string analysisLog = string.Format("huoyue server={0} account={1} player={2} zoneid={3} task_id={4}", new object[]
                                {
                                    GameManager.ServerId,
                                    client.strUserID,
                                    client.ClientData.LocalRoleID,
                                    client.ClientData.ZoneID,
                                    DailyActiveID
                                });
                                LogManager.WriteLog(LogTypes.Analysis, analysisLog, null, true);
                                bIsCompleted = true;
                            }
                        }
                    }
                }
            }
            return(needMinValue);
        }