示例#1
0
 public bool initialize()
 {
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.PlayerCreateRoleBeBan, IPInfoType.createRoleFailByBan);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.LoginFailByDataCheck, IPInfoType.LoginFailByDataCheckCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.LoginFailByUserBan, IPInfoType.LoginFailByBanCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.LoginFailByTimeout, IPInfoType.LoginFailByLoginTimeOutCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.LoginSuccess, IPInfoType.LoginSuccessCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.PlayerInitGameAsync, IPInfoType.InitGameSuccessCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.PlayerInitGameBeBan, IPInfoType.InitGameFailByBanCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.PlayerCreateRoleLimit, IPInfoType.createRoleFailByCnt);
     IPStatisticsManager.event2IPTypeDict.Add(EventTypes.SocketConnect, IPInfoType.ConnectCnt);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.LoginFailByDataCheck, UserParamType.Begin);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.LoginFailByUserBan, UserParamType.LoginFailByBanCnt);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.LoginFailByTimeout, UserParamType.LoginFailByLoginTimeOutCnt);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.PlayerInitGameBeBan, UserParamType.InitGameFailByBanCnt);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.PlayerCreateRoleLimit, UserParamType.createRoleFailByCnt);
     IPStatisticsManager.event2UserTypeDict.Add(EventTypes.PlayerCreateRoleBeBan, UserParamType.createRoleFailByBan);
     GlobalEventSource.getInstance().registerListener(43, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(46, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(47, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(48, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(45, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(15, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(42, IPStatisticsManager.getInstance());
     GlobalEventSource.getInstance().registerListener(44, IPStatisticsManager.getInstance());
     this.LoadConfig();
     return(true);
 }
示例#2
0
 public bool showdown()
 {
     try
     {
         lock (this.RuntimeData.Mutex)
         {
             this.RuntimeData.BackGroundThread.Abort();
             this.RuntimeData.BackGroundThread = null;
         }
         GlobalEventSource.getInstance().removeListener(12, KuaFuManager.getInstance());
         if (!HuanYingSiYuanClient.getInstance().showdown())
         {
             return(false);
         }
         if (!SpreadClient.getInstance().showdown())
         {
             return(false);
         }
         if (!AllyClient.getInstance().showdown())
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
     return(true);
 }
        public bool initialize()
        {
            bool result;

            if (!this.InitConfig())
            {
                result = true;
            }
            else
            {
                GlobalEventSource.getInstance().removeListener(14, AssemblyPatchManager.getInstance());
                GlobalEventSource.getInstance().removeListener(41, AssemblyPatchManager.getInstance());
                GlobalEventSource.getInstance().removeListener(12, AssemblyPatchManager.getInstance());
                GlobalEventSource.getInstance().removeListener(38, AssemblyPatchManager.getInstance());
                GlobalEventSource.getInstance().removeListener(39, AssemblyPatchManager.getInstance());
                GlobalEventSource.getInstance().removeListener(40, AssemblyPatchManager.getInstance());
                List <EventTypes> list = this.patchCfgDict.Keys.ToList <EventTypes>();
                foreach (EventTypes item in list)
                {
                    GlobalEventSource.getInstance().registerListener((int)item, AssemblyPatchManager.getInstance());
                }
                result = true;
            }
            return(result);
        }
示例#4
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(10002, 42, KarenBattleManager_MapEast.getInstance());
     GlobalEventSource.getInstance().removeListener(10, KarenBattleManager_MapEast.getInstance());
     GlobalEventSource.getInstance().removeListener(31, KarenBattleManager_MapEast.getInstance());
     return(true);
 }
示例#5
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1447, 1, 1, ArmorManager.getInstance(), TCPCmdFlags.IsBinaryStreamParams);
     GlobalEventSource.getInstance().registerListener(10, ArmorManager.getInstance());
     GlobalEventSource.getInstance().registerListener(57, ArmorManager.getInstance());
     return(true);
 }
示例#6
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1445, 1, 1, HuiJiManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1446, 1, 1, HuiJiManager.getInstance(), TCPCmdFlags.IsBinaryStreamParams);
     GlobalEventSource.getInstance().registerListener(10, HuiJiManager.getInstance());
     return(true);
 }
示例#7
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(910, 1, 1, ThemeBoss.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource.getInstance().registerListener(10, ThemeBoss.getInstance());
     GlobalEventSource.getInstance().registerListener(11, ThemeBoss.getInstance());
     return(true);
 }
示例#8
0
        public bool InitMagicSwordInfo(GameClient client, EMagicSwordTowardType eType)
        {
            bool result;

            if (!this.IsVersionSystemOpenOfMagicSword())
            {
                result = false;
            }
            else if (null == client)
            {
                LogManager.WriteLog(LogTypes.Error, string.Format("client不存在,初始化魔剑士信息", new object[0]), null, true);
                result = false;
            }
            else if (Global.AutoUpChangeLifeAndLevel(client, MagicSwordData.InitChangeLifeCount, MagicSwordData.InitLevel))
            {
                this.AutoMaigcSwordFirstAddPoint(client, eType);
                this.AutoGiveMagicSwordGoods(client);
                this.AutoGiveMagicSwordDefaultSkillHotKey(client, eType);
                GlobalEventSource.getInstance().fireEvent(new PlayerLevelupEventObject(client));
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
示例#9
0
 public bool showdown()
 {
     GlobalEventSource.getInstance().removeListener(28, BianShenManager.getInstance());
     GlobalEventSource.getInstance().removeListener(10, BianShenManager.getInstance());
     GlobalEventSource.getInstance().removeListener(58, BianShenManager.getInstance());
     return(true);
 }
示例#10
0
 public bool Init()
 {
     try
     {
         string fileName = "Config/JieRiGifts/JieRiChongZhiQiangGou.xml";
         GeneralCachingXmlMgr.RemoveCachingXml(Global.GameResPath(fileName));
         XElement xml = GeneralCachingXmlMgr.GetXElement(Global.GameResPath(fileName));
         if (null == xml)
         {
             return(false);
         }
         XElement args = xml.Element("Activities");
         if (null != args)
         {
             this.FromDate       = Global.GetSafeAttributeStr(args, "FromDate");
             this.ToDate         = Global.GetSafeAttributeStr(args, "ToDate");
             this.ActivityType   = (int)Global.GetSafeAttributeLong(args, "ActivityType");
             this.AwardStartDate = Global.GetSafeAttributeStr(args, "AwardStartDate");
             this.AwardEndDate   = Global.GetSafeAttributeStr(args, "AwardEndDate");
         }
         args = xml.Element("GiftList");
         if (null != args)
         {
             IEnumerable <XElement> xmlItems = args.Elements();
             foreach (XElement xmlItem in xmlItems)
             {
                 JieriCZQGConfigData item = new JieriCZQGConfigData();
                 item.ID             = (int)Global.GetSafeAttributeLong(xmlItem, "ID");
                 item.ZhiGouID       = (int)Global.GetSafeAttributeLong(xmlItem, "ZhiGouID");
                 item.SinglePurchase = (int)Global.GetSafeAttributeLong(xmlItem, "SinglePurchase");
                 string GoodsOne = Global.GetSafeAttributeStr(xmlItem, "GoodsOne");
                 string GoodsTwo = Global.GetSafeAttributeStr(xmlItem, "GoodsTwo");
                 UserMoneyMgr.getInstance().CheckChargeItemConfigLogic(item.ZhiGouID, item.SinglePurchase, GoodsOne, GoodsTwo, string.Format("充值抢购 ID={0}", item.ID));
                 string   DayString = Global.GetSafeAttributeStr(xmlItem, "Day");
                 string[] DayFiled  = DayString.Split(new char[]
                 {
                     ','
                 });
                 if (DayFiled.Length == 2)
                 {
                     int      SpanFromDay = Global.SafeConvertToInt32(DayFiled[0]) - 1;
                     int      SpanToDay   = Global.SafeConvertToInt32(DayFiled[1]);
                     DateTime startTime   = DateTime.Parse(this.FromDate);
                     item.FromDate = Global.GetAddDaysDataTime(startTime, SpanFromDay, true);
                     item.ToDate   = Global.GetAddDaysDataTime(startTime, SpanToDay, true);
                 }
                 this.CZQGConfigDict[item.ID] = item;
                 this.CZQGZhiGouIDSet.Add(item.ZhiGouID);
             }
         }
         base.PredealDateTime();
         GlobalEventSource.getInstance().registerListener(36, this);
     }
     catch (Exception ex)
     {
         LogManager.WriteLog(LogTypes.Fatal, string.Format("{0}解析出现异常, {1}", "Config/JieRiGifts/JieRiChongZhiQiangGou.xml", ex.Message), null, true);
         return(false);
     }
     return(true);
 }
示例#11
0
 public bool destroy()
 {
     //向事件源删除监听器
     GlobalEventSource.getInstance().removeListener((int)EventTypes.PlayerLeaveFuBen, CopyTeamEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener((int)EventTypes.PlayerLogout, CopyTeamEventListener.getInstance());
     return(true);
 }
示例#12
0
        public bool initialize()
        {
            //注册指令处理器
            TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_COPYTEAM, 5, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_COPYTEAM));
            TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_REGEVENTNOTIFY, 4, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_REGEVENTNOTIFY));
            TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_LISTCOPYTEAMS, 4, CopyTeamCmdProcessor.getInstance(TCPGameServerCmds.CMD_SPR_LISTCOPYTEAMS));

            //向事件源注册监听器
            GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLeaveFuBen, CopyTeamEventListener.getInstance());
            GlobalEventSource.getInstance().registerListener((int)EventTypes.PlayerLogout, CopyTeamEventListener.getInstance());

            //初始化组队副本的列表
            lock (SceneIndexRoleIDListDict)
            {
                lock (_SceneIndexDict)
                {
                    foreach (var systemFuBenItem in GameManager.systemFuBenMgr.SystemXmlItemDict.Values)
                    {
                        int copyType = systemFuBenItem.GetIntValue("CopyType");
                        if (Global.ConstTeamCopyType == copyType)
                        {
                            int copyID = systemFuBenItem.GetIntValue("ID");
                            _SceneIndexDict.Add(copyID, copyID);
                            SceneIndexRoleIDListDict.Add(copyID, new HashSet <int>());
                        }
                    }
                }
            }

            //需要记录伤害排名的副本ID集合
            RecordDamagesFuBenIDHashSet.Add(4000);

            return(true);
        }
示例#13
0
        public bool InitSummonerInfo(GameClient client)
        {
            bool result;

            if (!this.IsVersionSystemOpenOfSummoner())
            {
                result = false;
            }
            else if (null == client)
            {
                LogManager.WriteLog(LogTypes.Error, string.Format("client不存在,初始化召唤师信息", new object[0]), null, true);
                result = false;
            }
            else if (Global.AutoUpChangeLifeAndLevel(client, SummonerData.InitChangeLifeCount, SummonerData.InitLevel))
            {
                this.AutoSummonerFirstAddPoint(client);
                this.AutoGiveSummonerGoods(client);
                this.AutoGiveSummonerDefaultSkillHotKey(client);
                GlobalEventSource.getInstance().fireEvent(new PlayerLevelupEventObject(client));
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
示例#14
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1402, 1, 1, VideoLogic.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1403, 2, 2, VideoLogic.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource.getInstance().registerListener(28, VideoLogic.getInstance());
     GlobalEventSource.getInstance().registerListener(12, VideoLogic.getInstance());
     return(true);
 }
示例#15
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1110, 1, 1, GVoiceManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1112, 2, 2, GVoiceManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1111, 3, 3, GVoiceManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource.getInstance().registerListener(28, GVoiceManager.getInstance());
     return(true);
 }
示例#16
0
        public bool showdown()
        {
            //向事件源删除监听器
            GlobalEventSource4Scene.getInstance().removeListener((int)GlobalEventTypes.KuaFuNotifyEnterGame, (int)SceneUIClasses.TianTi, getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.PlayerDead, getInstance());

            return(true);
        }
示例#17
0
 public bool showdown()
 {
     GlobalEventSource.getInstance().removeListener(11, CopyWolfManager.getInstance());
     GlobalEventSource.getInstance().removeListener(35, CopyWolfManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(33, 34, CopyWolfManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(30, 34, CopyWolfManager.getInstance());
     return(true);
 }
示例#18
0
 public bool initialize()
 {
     //注册战盟事件指令处理器
     TCPCmdDispatcher.getInstance().registerProcessor((int)TCPGameServerCmds.CMD_SPR_ZHANMENGSHIJIAN_DETAIL, 2, ZhanMengShiJianDetailCmdProcessor.getInstance());
     //向事件源注册监听器
     GlobalEventSource.getInstance().registerListener((int)EventTypes.ZhanMengShiJian, ZhanMengShiJianEventListener.getInstance());
     return(true);
 }
示例#19
0
 public bool showdown()
 {
     GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterDead, getInstance());
     GlobalEventSource.getInstance().removeListener((int)EventTypes.MonsterToMonsterDead, getInstance());
     GlobalEventSource4Scene.getInstance().removeListener((int)EventTypes.PreMonsterInjure, (int)SceneUIClasses.CopyWolf, getInstance());
     GlobalEventSource4Scene.getInstance().removeListener((int)EventTypes.OnCreateMonster, (int)SceneUIClasses.CopyWolf, getInstance());
     return(true);
 }
示例#20
0
 public bool startup()
 {
     GlobalEventSource.getInstance().registerListener(11, CopyWolfManager.getInstance());
     GlobalEventSource.getInstance().registerListener(35, CopyWolfManager.getInstance());
     GlobalEventSource4Scene.getInstance().registerListener(33, 34, CopyWolfManager.getInstance());
     GlobalEventSource4Scene.getInstance().registerListener(30, 34, CopyWolfManager.getInstance());
     return(true);
 }
示例#21
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1310, 2, 2, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1311, 3, 3, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1312, 3, 3, SingletonTemplate <SevenDayActivityMgr> .Instance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource.getInstance().registerListener(32, SingletonTemplate <SevenDayActivityMgr> .Instance());
     return(true);
 }
示例#22
0
 public bool startup()
 {
     TCPCmdDispatcher.getInstance().registerProcessorEx(1120, 1, 1, KuaFuBossManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1121, 1, 1, KuaFuBossManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     TCPCmdDispatcher.getInstance().registerProcessorEx(1123, 1, 1, KuaFuBossManager.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource4Scene.getInstance().registerListener(10001, 31, KuaFuBossManager.getInstance());
     GlobalEventSource.getInstance().registerListener(56, KuaFuBossManager.getInstance());
     return(true);
 }
示例#23
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(10000, 29, SingletonTemplate <MoRiJudgeManager> .Instance());
     GlobalEventSource4Scene.getInstance().removeListener(10001, 29, SingletonTemplate <MoRiJudgeManager> .Instance());
     GlobalEventSource4Scene.getInstance().removeListener(10004, 29, SingletonTemplate <MoRiJudgeManager> .Instance());
     GlobalEventSource4Scene.getInstance().removeListener(10005, 29, SingletonTemplate <MoRiJudgeManager> .Instance());
     GlobalEventSource.getInstance().removeListener(11, SingletonTemplate <MoRiJudgeManager> .Instance());
     return(true);
 }
示例#24
0
 public bool initialize()
 {
     MarriageOtherLogic.getInstance().init();
     this.ManAndWifeBossXmlItems.LoadFromXMlFile("Config/ManAndWifeBoss.xml", "", "MonsterID", 0);
     TCPCmdDispatcher.getInstance().registerProcessorEx(870, 1, 2, MarryFuBenMgr.getInstance(), TCPCmdFlags.IsStringArrayParams);
     GlobalEventSource.getInstance().registerListener(18, MarryFuBenMgr.getInstance());
     GlobalEventSource.getInstance().registerListener(12, MarryFuBenMgr.getInstance());
     return(true);
 }
示例#25
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(10001, 49, WanMoXiaGuManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(10000, 49, WanMoXiaGuManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(10004, 49, WanMoXiaGuManager.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(10005, 49, WanMoXiaGuManager.getInstance());
     GlobalEventSource.getInstance().removeListener(11, WanMoXiaGuManager.getInstance());
     return(true);
 }
示例#26
0
 public bool showdown()
 {
     GlobalEventSource4Scene.getInstance().removeListener(33, 41, KarenBattleManager_MapWest.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(27, 41, KarenBattleManager_MapWest.getInstance());
     GlobalEventSource4Scene.getInstance().removeListener(30, 41, KarenBattleManager_MapWest.getInstance());
     GlobalEventSource.getInstance().removeListener(10, KarenBattleManager_MapWest.getInstance());
     GlobalEventSource.getInstance().removeListener(11, KarenBattleManager_MapWest.getInstance());
     return(true);
 }
示例#27
0
        public bool showdown()
        {
            //向事件源删除监听器
            GlobalEventSource4Scene.getInstance().removeListener((int)GlobalEventTypes.KuaFuNotifyEnterGame, (int)SceneUIClasses.HuanYingSiYuan, getInstance());
            GlobalEventSource4Scene.getInstance().removeListener((int)GlobalEventTypes.KuaFuRoleCountChange, (int)SceneUIClasses.HuanYingSiYuan, getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.ClientRegionEvent, getInstance());
            GlobalEventSource.getInstance().removeListener((int)EventTypes.PlayerDead, getInstance());

            return(true);
        }
示例#28
0
        public bool startup()
        {
            TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_SEVEN_DAY_ACT_QUERY, 2, 2, SevenDayActivityMgr.Instance());
            TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_SEVEN_DAY_ACT_GET_AWARD, 3, 3, SevenDayActivityMgr.Instance());
            TCPCmdDispatcher.getInstance().registerProcessorEx((int)TCPGameServerCmds.CMD_SPR_SEVEN_DAY_ACT_QIANG_GOU, 3, 3, SevenDayActivityMgr.Instance());

            GlobalEventSource.getInstance().registerListener((int)EventTypes.SevenDayGoal, SevenDayActivityMgr.Instance());

            return(true);
        }
示例#29
0
 public bool initialize()
 {
     GlobalEventSource.getInstance().registerListener(16, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(11, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(17, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(19, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(18, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().registerListener(20, BossAIEventListener.getInstance());
     return(true);
 }
示例#30
0
 public bool destroy()
 {
     GlobalEventSource.getInstance().removeListener(16, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(11, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(17, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(19, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(18, BossAIEventListener.getInstance());
     GlobalEventSource.getInstance().removeListener(20, BossAIEventListener.getInstance());
     return(true);
 }