ACR_ServerCommunicator.ACR_ServerCommunicator.ResolveCharacterNameToPlayerId C# (CSharp) Method

ResolveCharacterNameToPlayerId() private method

Look up a character by name and return the owning player id. The local cache (only) is queried. If the character was not in the local cache (which implies that the player was not online), then no query to the database is made and 0 is returned.
private ResolveCharacterNameToPlayerId ( string CharacterName ) : int
CharacterName string Supplies the object name to look up. ///
return int
        private int ResolveCharacterNameToPlayerId(string CharacterName)
        {
            lock (WorldManager)
            {
                GameCharacter Character = WorldManager.ReferenceCharacterByName(CharacterName, null);

                if (Character == null)
                    return 0;

                return Character.Player.PlayerId;
            }
        }
ACR_ServerCommunicator