Ejemplo n.º 1
0
        // Constructor 3#: Used for Replay mode
        public XIVisi(string fileName, AoDisplay ad)
        {
            VI = new VW.Cyvi(ad);
            VI.Init(); VI.SetInGame(true);
            VW.Eywi eywi = new VW.Eywi(fileName);
            WI = eywi;

            this.ad = ad;
            Log = new ClLog(); Log.Start(Uid, false, false, 0);
            CommonConstruct();
            this.auid = eywi.Uid;
            isReplay = true;
        }
Ejemplo n.º 2
0
        // Constructor 2#: Used for Direct Connection
        private XIVisi(string server, int port, string name, int avatar,
            int hopeTeam, bool record, bool watcher, bool msglog, AoDisplay ad)
        {
            this.server = server; this.port = port;
            this.name = name; this.avatar = avatar;
            this.hopeTeam = hopeTeam;

            VI = new VW.Cyvi(ad);
            VI.Init(); VI.SetInGame(true);
            VW.Bywi bywi = new VW.Bywi(server, port, name, avatar, hopeTeam, 0, this);
            WI = bywi;

            this.ad = ad;
            Log = new ClLog(); Log.Start(Uid, record, msglog, 0);
            CommonConstruct();
            if (!bywi.StartConnectDirect(watcher, VI))
            {
                VI.Cout(Uid, "咦,您是不是掉线或者连错人了:-(");
                auid = 0; return;
            }
            VI.Cout(Uid, watcher ? "您开始旁观~" : "游戏开始咯~");
            this.auid = bywi.Uid;
            if (watcher)
                Uid = bywi.Uid;
            bywi.Log = Log; VI.Log = Log;
            WI.Send("C2ST," + Uid, Uid, 0);
            isReplay = false;
        }