internal PMWindow(Int16 Id)
        {
            this.Server   = Framework.GetInstance();
            this.form     = MainWindow2.GetInstance();
            this.Id       = Id;
            this.PMPlayer = (GraalPlayer)this.Server.PlayerManager.FindPlayer(this.Id);
            this.CenterToScreen();

            string TitleText = "";

            TitleText = this.PMPlayer.Account;
            if (this.PMPlayer.Nickname != "" && this.PMPlayer.Nickname != null)
            {
                TitleText += ": " + this.PMPlayer.Nickname;
            }
            this.Text = TitleText;
            this.InitializeComponent(Id);
            this.richTextBox1.ReadOnly = true;
            //this.listBox1 = listBox1;

            //e.

            /*
             * try
             * {
             *      this.InitializeComponent();
             *      this.Show();
             * }
             * catch (SyntaxErrorException e)
             * {
             *      this.form.Write_Text(e.Message + "\r\n");
             * }
             */
        }
Exemplo n.º 2
0
        public void ReceivedToall(GraalPlayer Player, CString Message)
        {
            this.form = Abstraction.GetInstance();

            ToallsWindow PM = ToallsWindow.GetInstance();

            if (PM != null)
            {
                PM.SetMessage(Player, Message);
            }
        }
Exemplo n.º 3
0
        public override void ReceivedPM(short PlayerId, CString Message)
        {
            GraalPlayer PMPlayer = this.PlayerManager.FindPlayer(PlayerId);

            if (PMPlayer != null)
            {
                this.ReceivedPM(PMPlayer, Message);
            }
            else
            {
                this.form.WriteText("Something went wrong. PMPlayer is null.");
            }
        }
Exemplo n.º 4
0
        public void ReceivedPM(GraalPlayer Player, CString Message)
        {
            this.form = Abstraction.GetInstance();

            if (Player != null)
            {
                this.form.WriteText(" -!- Received PM from " + Player.Account.ToString() + "!\n");
                PMWindowManager = PMWindowList.GetInstance();
                PMWindow PM = PMWindowManager.AddPMWindow(Player.Id);

                if (PM != null)
                {
                    PM.SetMessage(Message);
                }
            }
            else
            {
                this.form.WriteText("Something went wrong. Player is null.");
            }
        }
Exemplo n.º 5
0
        public override void ReceivedPM(string PlayerId, CString Message)
        {
            GraalPlayer PMPlayer = this.PlayerManager.FindPlayer(PlayerId);

            this.ReceivedPM(PMPlayer, Message);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Attach Player to Object
 /// </summary>
 public void detachplayer(GraalPlayer player)
 {
     if (player != null)
         Server.SendGSPacket(new CString() + (byte)GServerConnection.PacketOut.NCQUERY + (byte)GServerConnection.NCREQ.PLSETPROPS + (short)player.id + (byte)GraalPlayer.Properties.PLATTACHNPC + (byte)0 + (int)0);
 }
        /// <summary>
        /// Add Player to Playerlist (or return player)
        /// </summary>
        internal GraalPlayer AddPlayer(Int16 Id)
        {
            GraalPlayer pl = FindPlayer(Id);
            if (pl == null)
            {
                GraalPlayer Player = new GraalPlayer(this.Server, Id);
                PlayerList[Id] = Player;
                return Player;
            }

            return pl;
        }
Exemplo n.º 8
0
 /// <summary>
 /// Add Player to Level
 /// </summary>
 /// <param name="Player"></param>
 internal void AddPlayer(GraalPlayer Player)
 {
     if (!Players.Contains(Player))
     {
         Players.Add(Player);
         this.CallNPCs("onPlayerEnters", new object[] { Player });
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// Delete Player from Level
 /// </summary>
 /// <param name="Player"></param>
 internal void DeletePlayer(GraalPlayer Player)
 {
     if (Players.Contains(Player))
     {
         Players.Remove(Player);
         this.CallNPCs("onPlayerLeaves", new object[] { Player });
     }
 }