Exemplo n.º 1
0
 public static void ConnectToWS(string[] c)
 {
     int x = Convert.ToInt32(c[0]) - 1;
     try
     {
         if (lclient == null || lclient.Connected == false || lclient.Realmlist.Length < 1)
         {
             Log.WriteLine(LogType.Error, "Please connect to the logon server first.");
             return;
         }
         lclient.HardDisconnect();
         wclient = new WorldServerClient(Config.Login, lclient.Realmlist[x], lclient.mKey);
         wclient.Connect();
     }
     catch (Exception ex)
     {
         Log.WriteLine(LogType.Error, "Exception Occured");
         Log.WriteLine(LogType.Error, "Message: {0}", ex.Message);
         Log.WriteLine(LogType.Error, "Stacktrace: {0}", ex.StackTrace);
     }
 }
Exemplo n.º 2
0
 public PacketHandler(WorldServerClient client)
 {
     Handles = new List <PacketHandle>();
     wClient = client;
 }
Exemplo n.º 3
0
 public CombatMgr(WorldServerClient Client)
 {
     objectMgr = Client.objectMgr;
     movementMgr = Client.movementMgr;
     client = Client;
 }
Exemplo n.º 4
0
 public CombatMgr(WorldServerClient Client)
 {
     objectMgr   = Client.objectMgr;
     movementMgr = Client.movementMgr;
     client      = Client;
 }
Exemplo n.º 5
0
 public PacketLoop(WorldServerClient client, Socket socket)
 {
     wClient = client;
      tSocket = socket;
      ServiceStatus = ServiceType.World;
 }
Exemplo n.º 6
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (Status == ServiceType.None)
            {
                if (host.Text == "" || login.Text == "" || password.Text == "")
                {
                    MessageBox.Show("Please insert your logon data", "Error!");
                    return;
                }
                cl = new LogonServerClient(host.Text, login.Text, password.Text);

                cl.Connect();
                button1.Enabled = false;
                realmlist.Enabled = true;
            }
            else if (Status == ServiceType.Logon)
            {
                Realm rl = new Realm();
                if (realmlist.SelectedItem != null)
                {
                    rl = cl.Realmlist.First(s => s.Name == realmlist.SelectedItem.ToString());
                }
                else
                {
                    HandleDisconnect();
                    return;
                }
                wl = new WorldServerClient(login.Text, rl, cl.mKey);
                //cl.HardDisconnect();
                wl.Connect();
                button1.Enabled = false;
                charlist.Enabled = true;
                realmlist.Enabled = false;
                this.UseWaitCursor = true;
            }
            else if (Status == ServiceType.World)
            {
                Character rl = wl.Charlist.First(s => s.Name == charlist.SelectedItem.ToString());
                if (rl.Name == null)
                    return;

                wl.LoginPlayer(rl);

                this.Text = String.Format("[{0}][{1}] {2} - {3} on {4}:3724", rl.Race, rl.Class, rl.Name, wl.realm.Name, wl.realm.Address);

                button1.Enabled = false;
                charlist.Enabled = false;
                ChatTab cTab = new ChatTab("", ChatMsg.Say);
                AddTab(cTab);
            }
        }
Exemplo n.º 7
0
 public MovementMgr(WorldServerClient Client)
 {
     objectMgr  = Client.objectMgr;
     terrainMgr = Client.terrainMgr;
 }
Exemplo n.º 8
0
 public PacketHandler(WorldServerClient client)
 {
     Handles = new List<PacketHandle>();
     wClient = client;
 }
Exemplo n.º 9
0
 public MovementMgr(WorldServerClient Client)
 {
     objectMgr = Client.objectMgr;
     terrainMgr = Client.terrainMgr;
 }