예제 #1
0
        /// <summary>
        /// Add a possesser to this player
        /// </summary>
        public void Possess(PossessSession session)
        {
            var ghostList = new List<PossessSession>(session.Player.PossessedBy);
            if (this.Session is PossessSession && ghostList.Contains((PossessSession)this.Session))
            {
                session.Player.TellSystem(Chat.Red, "Already possessed by " + Name);
                return;
            }

            lock (possessLock)
            {
                var list = new List<PossessSession>(PossessedBy);
                list.Add(session);
                PossessedBy = list.ToArray();
            }
        }
예제 #2
0
 public PossessSession Join(Client player, Client victim)
 {
     PossessSession session = new PossessSession(player, victim);
     return session;
 }
예제 #3
0
 /// <summary>
 /// Remove a possesser from this player
 /// </summary>
 public void Exorcise(PossessSession session)
 {
     lock (possessLock)
     {
         var list = new List<PossessSession>(PossessedBy);
         list.Remove(session);
         PossessedBy = list.ToArray();
     }
 }
예제 #4
0
        public PossessSession Join(Client player, Client victim)
        {
            PossessSession session = new PossessSession(player, victim);

            return(session);
        }