コード例 #1
0
        public Api()
        {
            Logger = NLog.LogManager.GetCurrentClassLogger();
            Config = new Model.LoginServer();

            LoginServer = new Server.Login.Api()
            {
                IsBackground = true
            };
            GameServer = new Server.Game.Api()
            {
                IsBackground = true,
                MoveInterval = 100
            };

            LoginServer.Connected      += OnLoginConnected;
            LoginServer.ServerSelected += OnServerSelected;
            GameServer.Connected       += OnGameConnected;
            GameServer.EnterWorld      += OnEnterWorld;
            GameServer.LoggedOut       += OnLoggedOut;
            GameServer.StartMoving     += OnStartMoving;
            GameServer.FinishMoving    += OnFinishMoving;
            GameServer.ActionFailed    += OnActionFailed;
            GameServer.TargetChanged   += OnTargetChanged;
            GameServer.Attack          += OnAttack;
            GameServer.SkillStarted    += OnSkillStarted;
            GameServer.SkillLaunched   += OnSkillLaunched;
            GameServer.SkillCanceled   += OnSkillCanceled;
            GameServer.SkillReused     += OnSkillReused;
            GameServer.CreatureUpdate  += OnCreatureUpdate;
            GameServer.ItemInfo        += OnItemInfo;
            GameServer.Die             += OnDie;
            GameServer.QuestionAsked   += OnQuestionAsked;
            GameServer.ChatMessage     += OnChatMessage;
        }
コード例 #2
0
ファイル: Api.cs プロジェクト: EligiusSantori/L2Apf.NET
		public Api()
		{
			Logger = NLog.LogManager.GetCurrentClassLogger();
			Config = new Model.LoginServer();

			LoginServer = new Server.Login.Api()
			{
				IsBackground = true
			};
			GameServer = new Server.Game.Api()
			{
				IsBackground = true,
				MoveInterval = 100
			};

			LoginServer.Connected += OnLoginConnected;
			LoginServer.ServerSelected += OnServerSelected;
			GameServer.Connected += OnGameConnected;
			GameServer.EnterWorld += OnEnterWorld;
			GameServer.LoggedOut += OnLoggedOut;
			GameServer.StartMoving += OnStartMoving;
			GameServer.FinishMoving += OnFinishMoving;
			GameServer.ActionFailed += OnActionFailed;
			GameServer.TargetChanged += OnTargetChanged;
			GameServer.Attack += OnAttack;
			GameServer.SkillStarted += OnSkillStarted;
			GameServer.SkillLaunched += OnSkillLaunched;
			GameServer.SkillCanceled += OnSkillCanceled;
			GameServer.SkillReused += OnSkillReused;
			GameServer.CreatureUpdate += OnCreatureUpdate;
			GameServer.ItemInfo += OnItemInfo;
			GameServer.Die += OnDie;
			GameServer.QuestionAsked += OnQuestionAsked;
			GameServer.ChatMessage += OnChatMessage;
		}