/// <summary>Direct setter, ignores the current state. For use within a particular action chain, but never to initiate such a chain.</summary>
 public void SetGroupState(EGroupJoinState newState)
 {
     lock (_groupSync)
     {
         _groupJoinState = newState;
         //_myPlayer.DebugMessage("New state: " + Enum.GetName(typeof(EGroupJoinState), (byte)_groupJoinState));
     }
 }
        /// <summary>Determines whether a player is permitted to join or be invited to a party.</summary>
        public bool AttemptGroupStateChange(EGroupJoinState newState)
        {
            lock (_groupSync)
            {
                // Disallow being invited or attempting to join an existing party if in group, inviting, invited or pending a join
                if (_groupJoinState != EGroupJoinState.None || _inviteCount > 0)
                {
                    return(false);
                }

                _groupJoinState = newState;
                //_myPlayer.DebugMessage("New state: " + Enum.GetName(typeof(EGroupJoinState), (byte)_groupJoinState));
                return(true);
            }
        }