Esempio n. 1
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 });
     }
 }
Esempio n. 2
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);
 }
Esempio n. 3
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 });
     }
 }
        /// <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;
        }