ACR_ServerCommunicator.ACR_ServerCommunicator.HandleClientEnter C# (CSharp) Method

HandleClientEnter() private method

This method handles ClientEnter events and sends the banner to the entering PC.
private HandleClientEnter ( uint PlayerObject ) : void
PlayerObject uint Supplies the entering PC object id. ///
return void
        private void HandleClientEnter(uint PlayerObject)
        {
            //
            // Remove a character save block if one was set, in case the
            // player returns to a server they had portalled from previously.
            //

            EnableCharacterSave(PlayerObject);

            if (TryGetPlayerState(PlayerObject) != null)
                return;

            CreatePlayerState(PlayerObject);
            GetDatabase().ACR_SetPCLocalFlags(PlayerObject, 0);
          
            //
            // Remind the player that they have cross server event
            // notifications turned off if they did turn them off.
            //

            if (GetPlayerState(PlayerObject).Flags.HasFlag(PlayerStateFlags.ChatSelectShowLocalPlayersOnlyWhenCollapsed))
            {
                DelayCommand(6.0f, delegate()
                {
                    SendMessageToPC(PlayerObject, "Remote players are hidden when the chat select window is collapsed.  Type \"#hideremoteplayers off\" to show players on all servers.");
                });
            }

            if (!IsCrossServerNotificationEnabled(PlayerObject))
            {
                DelayCommand(6.0f, delegate()
                {
                    SendMessageToPC(PlayerObject, "Notifications for player log in and log out from other servers are currently disabled.  Type \"#notify on\" to turn them on.");
                });
            }

            DelayCommand(20.0f, delegate()
            {
                AssignCommand(PlayerObject, delegate()
                {
                    if (GetIsPC(PlayerObject) == FALSE)
                        return;

                    lock (WorldManager)
                    {
                        int OnlineUserCount = WorldManager.OnlineCharacters.Count<GameCharacter>();
                        int OnlineServerCount = 0;

                        foreach (GameServer Server in WorldManager.Servers)
                        {
                            if (!Server.Online)
                                break;

                            OnlineServerCount += 1;
                        }

                        SendMessageToPC(PlayerObject, String.Format(
                            "There are currently {0} player(s) logged in to {1} server(s).  Type \"#users\" for details.",
                            OnlineUserCount,
                            OnlineServerCount));
                    }

                    StartAccountAssociationCheck(PlayerObject);
                });
            });

            if (EnableLatencyCheck)
                UpdatePlayerLatency(PlayerObject);

            GUIResynchronizer.OnClientEnter(PlayerObject, this);
        }
ACR_ServerCommunicator