public static void ProcessDailyActiveKillMonster(GameClient killer, Monster victim)
 {
     if (DailyActiveManager.CheckLevCondition(killer, 1300) || DailyActiveManager.CheckLevCondition(killer, 1301) || DailyActiveManager.CheckLevCondition(killer, 1302))
     {
         killer.ClientData.DailyTotalKillMonsterNum += 1U;
         SafeClientData clientData = killer.ClientData;
         clientData.TimerKilledMonsterNum += 1;
         if (killer.ClientData.TimerKilledMonsterNum > 20)
         {
             killer.ClientData.TimerKilledMonsterNum = 0;
             DailyActiveManager.ModifyDailyActiveInfor(killer, killer.ClientData.DailyTotalKillMonsterNum, DailyActiveDataField1.DailyActiveTotalKilledMonsterNum, false);
         }
         DailyActiveManager.CheckDailyActiveKillMonster(killer);
         if (401 == victim.MonsterType)
         {
             for (int i = 0; i < Data.KillBossCountForChengJiu.Length; i++)
             {
                 if (victim.MonsterInfo.ExtensionID == Data.KillBossCountForChengJiu[i])
                 {
                     DailyActiveManager.CheckDailyActiveKillBoss(killer);
                 }
             }
         }
     }
 }
 public static void ProcessCompleteDailyTaskForDailyActive(GameClient client, int nValue)
 {
     if (!DailyActiveManager.IsDailyActiveCompleted(client, 400) || !DailyActiveManager.IsDailyActiveCompleted(client, 401))
     {
         if (DailyActiveManager.CheckLevCondition(client, 400) || DailyActiveManager.CheckLevCondition(client, 401))
         {
             client.ClientData.DailyCompleteDailyTaskCount = (uint)nValue;
             DailyActiveManager.ModifyDailyActiveInfor(client, client.ClientData.DailyCompleteDailyTaskCount, DailyActiveDataField1.DailyActiveCompleteDailyTask, true);
             bool bIsCompleted = false;
             DailyActiveManager.CheckSingleConditionForDailyActive(client, 400, 401, (long)((ulong)client.ClientData.DailyCompleteDailyTaskCount), "RiChang", out bIsCompleted);
         }
     }
 }
 public static void CheckDailyActiveKillBoss(GameClient client)
 {
     if (!DailyActiveManager.IsDailyActiveCompleted(client, 1400))
     {
         if (DailyActiveManager.CheckLevCondition(client, 1400))
         {
             bool bIsCompleted = false;
             client.ClientData.DailyTotalKillKillBossNum += 1U;
             DailyActiveManager.ModifyDailyActiveInfor(client, client.ClientData.DailyTotalKillKillBossNum, DailyActiveDataField1.DailyActiveTotalKilledBossNum, true);
             DailyActiveManager.CheckSingleConditionForDailyActive(client, 1400, 1400, (long)client.ClientData.MyRoleDailyData.TodayKillBoss, "KillBoss", out bIsCompleted);
         }
     }
 }
 public static void ProcessDailyActiveMergeFruit(GameClient client)
 {
     if (!DailyActiveManager.IsDailyActiveCompleted(client, 1600))
     {
         if (DailyActiveManager.CheckLevCondition(client, 1600))
         {
             int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveMergeFruit);
             nNum++;
             DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveMergeFruit, true);
             bool bIsCompleted = false;
             DailyActiveManager.CheckSingleConditionForDailyActive(client, 1600, 1600, (long)nNum, "HeChengLimit", out bIsCompleted);
         }
     }
 }
 public static void ProcessLoginForDailyActive(GameClient client, out bool bIsCompleted)
 {
     bIsCompleted = false;
     if (!DailyActiveManager.IsDailyActiveCompleted(client, 100))
     {
         if (DailyActiveManager.CheckLevCondition(client, 100))
         {
             client.ClientData.DailyActiveDayLginCount += 1U;
             uint nvalue = DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveDayLoginNum);
             DailyActiveManager.ModifyDailyActiveInfor(client, client.ClientData.DailyActiveDayLginCount, DailyActiveDataField1.DailyActiveDayLoginNum, true);
             nvalue = DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveDayLoginNum);
             DailyActiveManager.CheckSingleConditionForDailyActive(client, 100, 100, (long)((ulong)client.ClientData.DailyActiveDayLginCount), "Login", out bIsCompleted);
             client.ClientData.DailyActiveDayLginSetFlag = true;
         }
     }
 }
        public static void ProcessCompleteCopyMapForDailyActive(GameClient client, int nCopyMapLev, int count = 1)
        {
            if (!DailyActiveManager.IsDailyActiveCompleted(client, 500) || !DailyActiveManager.IsDailyActiveCompleted(client, 600) || !DailyActiveManager.IsDailyActiveCompleted(client, 700))
            {
                if (nCopyMapLev >= 0)
                {
                    bool bIsCompleted = false;
                    switch (nCopyMapLev)
                    {
                    case 1:
                        if (DailyActiveManager.CheckLevCondition(client, 500))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteCopyMap1);
                            nNum++;
                            nNum *= count;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteCopyMap1, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 500, 500, (long)nNum, "KillRaid", out bIsCompleted);
                        }
                        break;

                    case 2:
                        if (DailyActiveManager.CheckLevCondition(client, 600))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteCopyMap2);
                            nNum++;
                            nNum *= count;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteCopyMap2, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 600, 600, (long)nNum, "KillRaid", out bIsCompleted);
                        }
                        break;

                    case 3:
                        if (DailyActiveManager.CheckLevCondition(client, 700))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteCopyMap3);
                            nNum++;
                            nNum *= count;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteCopyMap3, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 700, 700, (long)nNum, "KillRaid", out bIsCompleted);
                        }
                        break;
                    }
                }
            }
        }
        public static void ProcessCompleteDailyActivityForDailyActive(GameClient client, int nType)
        {
            if (!DailyActiveManager.IsDailyActiveCompleted(client, 800) || !DailyActiveManager.IsDailyActiveCompleted(client, 900) || !DailyActiveManager.IsDailyActiveCompleted(client, 1000))
            {
                if (nType >= 0)
                {
                    bool bIsCompleted = false;
                    switch (nType)
                    {
                    case 1:
                        if (DailyActiveManager.CheckLevCondition(client, 800))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteBloodCastle);
                            nNum++;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteBloodCastle, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 800, 800, (long)nNum, "HuoDongLimit", out bIsCompleted);
                        }
                        break;

                    case 2:
                        if (DailyActiveManager.CheckLevCondition(client, 900))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteDaimonSquare);
                            nNum++;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteDaimonSquare, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 900, 900, (long)nNum, "HuoDongLimit", out bIsCompleted);
                        }
                        break;

                    case 3:
                        if (DailyActiveManager.CheckLevCondition(client, 1000))
                        {
                            int nNum = (int)DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveCompleteBattle);
                            nNum++;
                            DailyActiveManager.ModifyDailyActiveInfor(client, (uint)nNum, DailyActiveDataField1.DailyActiveCompleteBattle, true);
                            DailyActiveManager.CheckSingleConditionForDailyActive(client, 1000, 1000, (long)nNum, "HuoDongLimit", out bIsCompleted);
                        }
                        break;
                    }
                }
            }
        }
        public static void ProcessOnlineForDailyActive(GameClient client)
        {
            bool bIsCompleted = false;

            if (!DailyActiveManager.IsDailyActiveCompleted(client, 200))
            {
                if (client.ClientData.DayOnlineSecond - client.ClientData.DailyOnlineTimeTmp > 0)
                {
                    client.ClientData.DailyOnlineTimeTmp += 60;
                    if (!DailyActiveManager.CheckLevCondition(client, 200))
                    {
                        bIsCompleted = false;
                    }
                    else
                    {
                        DailyActiveManager.CheckSingleConditionForDailyActive(client, 200, 200, (long)(client.ClientData.DayOnlineSecond / 60), "Online", out bIsCompleted);
                    }
                }
            }
        }
        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);
        }
        public static void ProcessBuyItemInMallForDailyActive(GameClient client, int nValue)
        {
            int xiaoFei = Global.GetRoleParamsInt32FromDB(client, "10175");

            xiaoFei += nValue;
            if (xiaoFei >= 100)
            {
                WebOldPlayerManager.getInstance().ChouJiangAddCheck(client.ClientData.RoleID, 2);
            }
            Global.SaveRoleParamsInt32ValueToDB(client, "10175", xiaoFei, true);
            if (!DailyActiveManager.IsDailyActiveCompleted(client, 300))
            {
                if (DailyActiveManager.CheckLevCondition(client, 300))
                {
                    uint nSpend = DailyActiveManager.GetDailyActiveDataByField(client, DailyActiveDataField1.DailyActiveBuyItemInMall);
                    client.ClientData.DailyActiveDayBuyItemInMall += (int)(nSpend + (uint)nValue);
                    DailyActiveManager.ModifyDailyActiveInfor(client, (uint)client.ClientData.DailyActiveDayBuyItemInMall, DailyActiveDataField1.DailyActiveBuyItemInMall, true);
                    bool bIsCompleted = false;
                    DailyActiveManager.CheckSingleConditionForDailyActive(client, 300, 300, (long)client.ClientData.DailyActiveDayBuyItemInMall, "Consumption", out bIsCompleted);
                }
            }
        }