Exemple #1
0
        public virtual void SendAddPlayer(Player player, Position position)
        {
            lock (lockThis) {
                foreach (KeyValuePair<string, Player> kvp in playersOnline) {
                    kvp.Value.AddStatusMessage(player.Name + " has loged in.");
                }
                //GMs or higher are immune to combat damage
                if (player.Access >= Constants.ACCESS_GAMEMASTER) {
                    player.Immunities = new ImmunityType[]
                     {ImmunityType.IMMUNE_ELECTRIC, ImmunityType.IMMUNE_FIRE,
                     ImmunityType.IMMUNE_PHYSICAL, ImmunityType.IMMUNE_POISON};
                }

                SendAddCreature(player, position);
                playersOnline.Add(player.Name.ToLower(), player);
                player.AddLoginBytes(gameMap);
                SendProtocolMessages();
            }
        }