Example #1
0
        internal Client(ClientForm form)
        {
            cForm            = form;
            EncryptedHeaders = new ushort[1200];

            //Rework script class later
            ScriptManager = new ScriptManager(this);

            handshakeHandler = new Handshake(this);
            packetHandler    = new Packet(this);
            Account          = cForm.GetAccount();
            mode             = Account.Mode;
            Mapler           = new Mapler();
            Map          = new Map();
            Inventory    = new Inventory();
            UpdateMapler = cForm.UpdateMapler;
            UpdateInfo   = cForm.UpdateInfo;
            UpdateAction = cForm.UpdateAction;

            MapRush = new Progress <List <PortalInfo> >(list => {
                if (list == null)
                {
                    return;
                }
                foreach (var data in list)
                {
                    SendPacket(Portal.Enter(Account.info, data));
                    Account.info.IncrementPortalCount();
                    Thread.Sleep(30); // small delay just in case
                }
            });
        }
Example #2
0
 internal void ClearStats()
 {
     UpdateMapler.Report(null);
     UpdateInfo.Report(null);
     UpdateAction.Report("Disconnected");
     //UpdateMesos.Report(-1);
     Account = cForm.GetAccount();
     Inventory.Clear();
     Map.Clear();
 }