ACR_ServerCommunicator.ACR_ServerCommunicator.GetPlayerByName C# (CSharp) Method

GetPlayerByName() private method

Get a global player by character name.
private GetPlayerByName ( string First, string Last ) : ACR_ServerCommunicator.GamePlayer
First string Supplies the character first name.
Last string Optionally supplies the character last name. ///
return ACR_ServerCommunicator.GamePlayer
        private GamePlayer GetPlayerByName(string First, string Last)
        {
            uint LocalPlayerObject = GetLocalPlayerByName(First, Last);

            if (LocalPlayerObject != OBJECT_INVALID)
                return WorldManager.ReferencePlayerById(GetDatabase().ACR_GetPlayerID(LocalPlayerObject), GetDatabase());

            string Name = First;

            if (!String.IsNullOrEmpty(Last))
            {
                Name += " ";
                Name += Last;
            }

            GameCharacter Character = WorldManager.ReferenceCharacterByName(Name, GetDatabase());

            if (Character == null)
                return null;

            return Character.Player;
        }
ACR_ServerCommunicator