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

SetFlag() public method

public SetFlag ( PlayerFlag flag, bool value ) : void
flag PlayerFlag
value bool
return void
        public void SetFlag(PlayerFlag flag, bool value)
        {
            if (value)
                m_Flags |= flag;
            else
                m_Flags &= ~flag;
        }

Usage Example

Exemplo n.º 1
0
        public override void OnItemLifted(Mobile from, Item item)
        {
            base.OnItemLifted(from,item);

            if(from is PlayerMobile && Owner == null)
            {
                Owner = from as PlayerMobile;
                LootType = LootType.Blessed;
                // flag the owner as carrying a questtoken assuming the book contains quests and then confirm it with CheckOwnerFlag
                Owner.SetFlag(XmlQuest.CarriedXmlQuestFlag,true);
                CheckOwnerFlag();
            }
        }
All Usage Examples Of Server.Mobiles.PlayerMobile::SetFlag