Server.Mobiles.PlayerMobile.GetFlag C# (CSharp) Method

GetFlag() public method

public GetFlag ( PlayerFlag flag ) : bool
flag PlayerFlag
return bool
        public bool GetFlag(PlayerFlag flag)
        {
            return ((m_Flags & flag) != 0);
        }

Usage Example

Example #1
0
        public static void RegisterMove(PlayerMobile m_player)
        {

            if (m_player == null || m_player.Map == null) return;

            // check for any attachments that might support the OnMove method
            //XmlAttach.CheckOnMove(m_player);

            // check to see if the current sector that the player is in, is registered in the VISIT sector list
            Sector newSector = m_player.Map.GetSector(m_player.Location);

            if (VisitSectorList != null && VisitSectorList.Contains(newSector))
            {
                // check to see if the player has a quest with a VISIT type objective
                if (m_player.GetFlag(CarriedXmlQuestFlag))
                {
                    CheckVisited(m_player);
                }
            }
        }