public PartyAttackerEntry(int partyid, ChannelServer cserv, MapleMonster monster) { this.m_partyId = partyid; this.m_cserv = cserv; m_attackers = new Dictionary <int, OnePartyAttacker>(6); m_monster = monster; }
public MonsterAI(Monster monster, ChannelServer server) : base(monster, 1000) { this.Server = server; AITimer.Elapsed += new System.Timers.ElapsedEventHandler(AITimer_Elapsed); AITimer.Enabled = false; Random = new Random(); }
/// <summary> /// The main entry point for the application. /// </summary> public void Start() { if (!System.IO.Directory.Exists(m_sWMVDirectory)) { System.IO.Directory.CreateDirectory(m_sWMVDirectory); } Logger.LogInformation("Using " + m_sWMVDirectory + " to store WMV files."); m_Server = new ChannelServer(m_iChannel,m_sWMVDirectory); m_Server.Start(); }
public SubProcessRunner(string filename, string arguments, string channelSessionId, ChannelServer channelServer) { _filename = filename; _arguments = arguments; _sessionId = channelSessionId; _channelServer = channelServer; _stdoutThread = new Thread(StdoutThreadProc); _stderrThread = new Thread(StderrThreadProc); _ingressChannelThread = new Thread(IngressChannelThreadProc); }
public ChannelServerMain() { InitializeComponent(); channelServer = new ChannelServer(Properties.Settings.Default.ChannelServerIP, Properties.Settings.Default.ChannelServerPort); channelServer.ClientConnected += new EventHandler <ClientConnectionEventArgs>(channelServer_ClientConnected); channelServer.ClientExceptionOccoured += new EventHandler <ClientExceptionEventArgs>(channelServer_ClientExceptionOccoured); channelServer.ClientUnknownPacket += new EventHandler <UnknownPacketEventArgs>(channelServer_ClientUnknownPacket); }
/// <summary> /// The main entry point for the application. /// </summary> public void Start() { Logger logger = new Logger(AppInfo.Title + m_iChannel); if (!System.IO.Directory.Exists(m_sWMVDirectory)) { System.IO.Directory.CreateDirectory(m_sWMVDirectory); } logger.WriteLog("Using " + m_sWMVDirectory + " to store WMV files."); m_Server = new ChannelServer(m_iChannel,m_sWMVDirectory,ref logger); m_Server.Start(); }
/// <summary> /// The connection bean with unmodifiable objects. Once it is set, it cannot be changed. /// If it is required to change, then the peer must be shut down and a new one created. /// </summary> /// <param name="p2PId">The P2P ID.</param> /// <param name="dispatcher">The dispatcher object that receives all messages.</param> /// <param name="sender">The sender object that sends out messages.</param> /// <param name="channelServer">The channel server that listens on incoming connections.</param> /// <param name="reservation">The connection reservation that is responsible for resource management.</param> /// <param name="resourceConfiguration">The configuration that is responsible for the resource numbers.</param> /// <param name="timer">The timer for the discovery process.</param> public ConnectionBean(int p2PId, Dispatcher dispatcher, Sender sender, ChannelServer channelServer, Reservation reservation, ChannelClientConfiguration resourceConfiguration, ExecutorService timer) { P2PId = p2PId; Dispatcher = dispatcher; Sender = sender; ChannelServer = channelServer; Reservation = reservation; ResourceConfiguration = resourceConfiguration; Timer = timer; }
public ChannelServerMain() { InitializeComponent(); channelServer = new ChannelServer(Properties.Settings.Default.ChannelServerIP, Properties.Settings.Default.ChannelServerPort, Properties.Settings.Default.ExpRate, Properties.Settings.Default.ItemDropChance, Properties.Settings.Default.MoneyDropChance, Properties.Settings.Default.StoneDropChance, Properties.Settings.Default.BookDropChance, Properties.Settings.Default.PillDropChance, Properties.Settings.Default.StoneCombineChance); channelServer.ClientConnected += new EventHandler<ClientConnectionEventArgs>(channelServer_ClientConnected); channelServer.ClientExceptionOccoured += new EventHandler<ClientExceptionEventArgs>(channelServer_ClientExceptionOccoured); channelServer.ClientUnknownPacket += new EventHandler<UnknownPacketEventArgs>(channelServer_ClientUnknownPacket); channelServer.ClientLogPacket += new EventHandler<LogPacketEventArgs>(channelServer_ClientLogPacket); channelServer.ClientConnectionChanged += new EventHandler<PlayerConnectionChangedEventArgs>(channelServer_ClientConnectionChanged); }
public static void Main() { try { ChannelServer.LoginServerConnection = new InteroperabilityClient(new IPEndPoint( Settings.GetIPAddress("Login/IP"), Settings.GetInt("Login/Port")), Settings.GetString("Login/SecurityCode"), WorldNameResolver.GetID(Settings.GetString("Server/World"))); ChannelServer.LoginServerConnection.Loop(); } catch (Exception e) { Log.Error("Server connection failed: \n{0}", e.Message); ChannelServer.Stop(); } }
public static void StartChannels() { ushort channelStartPort = ServerConstants.ChannelStartPort; byte i = 0; byte channelCount = ServerConstants.Channels; while (i < channelCount) { ChannelServer channelServer = new ChannelServer(i); channelServer.OnClientConnected += MapleClientConnect; ushort port = (ushort)(channelStartPort + i); channelServer.Start(ServerConstants.LocalHost ? new IPAddress(ServerConstants.LocalHostIp) : IPAddress.Any, port); ChannelServers.Add((byte)(i), channelServer); ServerConsole.Info(String.Format("ChannelServer[{0}] is running on port {1}", i + 1, port)); i++; } ServerConsole.Info("Server and channels are running."); ServerConsole.Info("To safely stop the server type 'exit'"); }
public ChannelPlugin() { try { Server = new ChannelServer(); VA.Loaded += (sender, args) => { var enabled = Settings["Enabled"].Value; bool found; if (bool.TryParse(enabled, out found) && found) { Server.Start(); } }; } catch (Exception exception) { VA.Logger.Error(exception); } }
private static void MigrateClient(MapleClient client, int characterID) { ChannelServer destination = MasterServer.Instance.Worlds[client.World].Channels[client.Channel]; destination.Migrations.Add(client.Host, client.Account.ID, characterID); using (OutPacket oPacket = new OutPacket(SendOps.SelectCharacterResult)) { oPacket .WriteByte() .WriteByte() .WriteBytes(new byte[4] { 127, 0, 0, 1 }) .WriteShort(destination.Port) .WriteInt(characterID) .WriteInt() .WriteByte(); client.Send(oPacket); } }
public SingleAttackerEntry(MapleCharacter from, ChannelServer cserv, MapleMonster monster) { m_chrid = from.Id; m_cserv = cserv; m_monster = monster; }
protected override void StopServer() { ChannelServer.Stop(); }
public EventManager(ChannelServer cserv, string name) { //this.iv = iv; ChannelServer = cserv; Name = name; }