Ejemplo n.º 1
0
        private static int ReloadXmlFile_config_bangzhanawards()
        {
            int ret = GameManager.systemBangZhanAwardsMgr.ReloadLoadFromXMlFile();

            BangZhanAwardsMgr.ClearAwardsByLevels();
            return(ret);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 6
0
        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);
                        }
                    }
                }
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
                     }
                 }
             }
         }
     }
 }