Exemple #1
0
        private static int ReloadXmlFile_config_bangzhanawards()
        {
            int ret = GameManager.systemBangZhanAwardsMgr.ReloadLoadFromXMlFile();

            BangZhanAwardsMgr.ClearAwardsByLevels();
            return(ret);
        }
Exemple #2
0
        /// <summary>
        /// 定时给在场的玩家增加经验
        /// </summary>
        private static void ProcessTimeAddRoleExp()
        {
            long ticks = DateTime.Now.Ticks / 10000;

            if (ticks - LastAddBangZhanAwardsTicks < (10 * 1000))
            {
                return;
            }

            LastAddBangZhanAwardsTicks = ticks;

            //先找出当前大乱斗中的所有的或者的人
            List <Object> objsList = GameManager.ClientMgr.GetMapClients(Global.GetHuangGongMapCode());

            if (null == objsList)
            {
                return;
            }

            for (int i = 0; i < objsList.Count; i++)
            {
                GameClient c = objsList[i] as GameClient;
                if (c == null)
                {
                    continue;
                }

                //if (c.ClientData.CurrentLifeV <= 0) continue;

                /// 处理用户的经验奖励
                BangZhanAwardsMgr.ProcessBangZhanAwards(c);
            }
        }
Exemple #3
0
        private static void ProcessAddRoleRongYu(GameClient client)
        {
            int rongYu = BangZhanAwardsMgr.GetRongYuByLevel(client.ClientData.Level);

            if (rongYu > 0)
            {
                GameManager.ClientMgr.ModifyRongYuValue(client, rongYu, true, true);
            }
        }
Exemple #4
0
        private static void ProcessAddRoleExperience(GameClient client)
        {
            long exp = BangZhanAwardsMgr.GetExpByLevel(client.ClientData.Level);

            if (exp > 0L)
            {
                GameManager.ClientMgr.ProcessRoleExperience(client, exp, true, false, false, "none");
            }
        }
Exemple #5
0
        /// 处理用户的在场的时间经验奖励
        private static void ProcessAddRoleExperience(GameClient client)
        {
            long exp = BangZhanAwardsMgr.GetExpByLevel(client.ClientData.Level);

            if (exp <= 0)
            {
                return;
            }

            //处理角色经验
            GameManager.ClientMgr.ProcessRoleExperience(client, exp, true, false);
        }
        private static void ProcessTimeAddRoleExp()
        {
            long ticks = TimeUtil.NOW();

            if (ticks - WangChengManager.LastAddBangZhanAwardsTicks >= 10000L)
            {
                WangChengManager.LastAddBangZhanAwardsTicks = ticks;
                List <object> objsList = GameManager.ClientMgr.GetMapClients(Global.GetHuangGongMapCode());
                if (null != objsList)
                {
                    for (int i = 0; i < objsList.Count; i++)
                    {
                        GameClient c = objsList[i] as GameClient;
                        if (c != null)
                        {
                            BangZhanAwardsMgr.ProcessBangZhanAwards(c);
                        }
                    }
                }
            }
        }
Exemple #7
0
        /// <summary>
        /// 定时给在场的玩家增加经验
        /// </summary>
        private void ProcessTimeAddRoleExp()
        {
            if (BattlingState != BattleStates.StartFight) //非战斗装备,不加经验
            {
                return;
            }

            long ticks = DateTime.Now.Ticks / 10000;

            if (ticks - LastAddBangZhanAwardsTicks < (10 * 1000))
            {
                return;
            }

            LastAddBangZhanAwardsTicks = ticks;

            //先找出当前大乱斗中的所有的或者的人
            List <Object> objsList = GameManager.ClientMgr.GetMapClients(MapCode);

            if (null == objsList)
            {
                return;
            }

            for (int i = 0; i < objsList.Count; i++)
            {
                GameClient c = objsList[i] as GameClient;
                if (c == null)
                {
                    continue;
                }

                //if (c.ClientData.CurrentLifeV <= 0) continue;

                /// 处理用户的经验奖励
                BangZhanAwardsMgr.ProcessBangZhanAwards(c);
            }
        }
Exemple #8
0
 private void ProcessTimeAddRoleExp()
 {
     if (this.BattlingState == BattleStates.StartFight)
     {
         long ticks = TimeUtil.NOW();
         if (ticks - this.LastAddBangZhanAwardsTicks >= 10000L)
         {
             this.LastAddBangZhanAwardsTicks = ticks;
             List <object> objsList = GameManager.ClientMgr.GetMapClients(this.MapCode);
             if (null != objsList)
             {
                 for (int i = 0; i < objsList.Count; i++)
                 {
                     GameClient c = objsList[i] as GameClient;
                     if (c != null)
                     {
                         BangZhanAwardsMgr.ProcessBangZhanAwards(c);
                     }
                 }
             }
         }
     }
 }