Ejemplo n.º 1
0
        public bool SendReload(string str)
        {
            try
            {
                eReloadType type = (eReloadType)Enum.Parse(typeof(eReloadType), str, true);
                switch (type)
                {
                case eReloadType.server:
                    _config.Refresh();
                    InitGlobalTimers();
                    LoadConfig();
                    ServerMgr.ReLoadServerList();
                    SendConfigState();
                    break;

                default:
                    break;
                }

                GSPacketIn pkg = new GSPacketIn((byte)ePackageType.SYS_RELOAD);
                pkg.WriteInt((int)type);
                SendToALL(pkg, null);
                return(true);
            }
            catch (Exception ex)
            {
                //Console.WriteLine("请检查是否存在此指令!" + ex.ToString());
                log.Error("Order is not Exist!", ex);
            }
            return(false);
        }
Ejemplo n.º 2
0
 public bool SendReload(string str)
 {
     try
     {
         eReloadType eReloadType  = (eReloadType)Enum.Parse(typeof(eReloadType), str, true);
         eReloadType eReloadType2 = eReloadType;
         if (eReloadType2 == eReloadType.server)
         {
             this._config.Refresh();
             this.InitGlobalTimers();
             this.LoadConfig();
             ServerMgr.ReLoadServerList();
             this.SendConfigState();
         }
         GSPacketIn gSPacketIn = new GSPacketIn(11);
         gSPacketIn.WriteInt((int)eReloadType);
         this.SendToALL(gSPacketIn, null);
         return(true);
     }
     catch (Exception exception)
     {
         CenterServer.log.Error("Order is not Exist!", exception);
     }
     return(false);
 }
Ejemplo n.º 3
0
        public void HandleReload(GSPacketIn pkg)
        {
            eReloadType eReloadType = (eReloadType)pkg.ReadInt();
            int         num         = pkg.ReadInt();
            bool        flag        = pkg.ReadBoolean();

            Console.WriteLine((string)(object)num + (object)" " + ((object)eReloadType).ToString() + " is reload " + (string)(flag ? (object)"succeed!" : (object)"fail"));
        }
Ejemplo n.º 4
0
        public void HandleReload(GSPacketIn pkg)
        {
            eReloadType type     = (eReloadType)pkg.ReadInt();
            int         serverID = pkg.ReadInt();
            bool        result   = pkg.ReadBoolean();

            Console.WriteLine(serverID + " " + type.ToString() + " is reload " + (result ? "succeed!" : "fail"));
        }
Ejemplo n.º 5
0
 public bool SendReload(eReloadType type)
 {
     return(SendReload(type.ToString()));
 }
Ejemplo n.º 6
0
 public bool SendReload(eReloadType type)
 {
     return SendReload(type.ToString());
 }
Ejemplo n.º 7
0
 public void Reload(eReloadType type)
 {
 }
Ejemplo n.º 8
0
        public void HandleReload(GSPacketIn packet)
        {
            eReloadType type   = (eReloadType)packet.ReadInt();
            bool        result = false;

            switch (type)
            {
            case eReloadType.ball:
                result = BallMgr.ReLoad();
                break;

            case eReloadType.fusion:
                result = FusionMgr.ReLoad();
                break;

            case eReloadType.item:
                result = ItemMgr.ReLoad();
                break;

            case eReloadType.map:
                result = MapMgr.ReLoadMap();
                break;

            case eReloadType.mapserver:
                result = MapMgr.ReLoadMapServer();
                break;

            case eReloadType.quest:
                result = QuestMgr.ReLoad();
                break;

            case eReloadType.server:
                GameServer.Instance.Configuration.Refresh();
                break;

            case eReloadType.rate:
                result = RateMgr.ReLoad();
                break;

            case eReloadType.fight:
                result = FightRateMgr.ReLoad();
                break;

            case eReloadType.dailyaward:
                result = AwardMgr.ReLoad();
                break;

            case eReloadType.language:
                result = LanguageMgr.Reload("");
                break;

            default:
                break;

            case eReloadType.shop:
                result = ShopMgr.ReLoad();

                break;

            case eReloadType.consortia:
                result = ConsortiaMgr.ReLoad();
                break;
                //case eReloadType.prop:
                //    result = PropItemMgr.Reload();
                //    break;
            }
            packet.WriteInt(GameServer.Instance.Configuration.ServerID);
            packet.WriteBoolean(result);
            SendTCP(packet);
        }
Ejemplo n.º 9
0
 public void Reload(eReloadType type)
 {
 }
Ejemplo n.º 10
0
        public void HandleReload(GSPacketIn packet)
        {
            eReloadType eReloadType = (eReloadType)packet.ReadInt();
            bool        val         = false;

            switch (eReloadType)
            {
            case eReloadType.ball:
                val = BallMgr.ReLoad();
                break;

            case eReloadType.map:
                val = MapMgr.ReLoadMap();
                break;

            case eReloadType.mapserver:
                val = MapMgr.ReLoadMapServer();
                break;

            case eReloadType.item:
                val = ItemMgr.ReLoad();
                break;

            case eReloadType.quest:
                val = QuestMgr.ReLoad();
                break;

            case eReloadType.fusion:
                val = FusionMgr.ReLoad();
                break;

            case eReloadType.server:
                GameServer.Instance.Configuration.Refresh();
                break;

            case eReloadType.rate:
                val = RateMgr.ReLoad();
                break;

            case eReloadType.consortia:
                val = ConsortiaMgr.ReLoad();
                break;

            case eReloadType.shop:
                val = ShopMgr.ReLoad();
                break;

            case eReloadType.fight:
                val = FightRateMgr.ReLoad();
                break;

            case eReloadType.dailyaward:
                val = AwardMgr.ReLoad();
                break;

            case eReloadType.language:
                val = LanguageMgr.Reload("");
                break;
            }
            packet.WriteInt(GameServer.Instance.Configuration.ServerID);
            packet.WriteBoolean(val);
            this.SendTCP(packet);
        }