Пример #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                m_Flags      = (StealthSkillScrollFlags)reader.ReadEncodedInt();
                m_ExpireDate = reader.ReadDateTime();
                goto case 0;
            }

            case 0:
            {
                m_SkillBonus = reader.ReadInt();
                break;
            }
            }

            //We save it just in case, then delete it afterwards
            if (Expires && DateTime.UtcNow >= m_ExpireDate)
            {
                AddToCleanup(this);
            }
            SkillScroll.ConvertSkillScroll(this, m_OldSkills[0]);
        }
Пример #2
0
		public void SetFlag( StealthSkillScrollFlags flag, bool value )
		{
			if ( value )
				m_Flags |= flag;
			else
				m_Flags &= ~flag;
		}
Пример #3
0
 public void SetFlag(StealthSkillScrollFlags flag, bool value)
 {
     if (value)
     {
         m_Flags |= flag;
     }
     else
     {
         m_Flags &= ~flag;
     }
 }
Пример #4
0
 public bool GetFlag(StealthSkillScrollFlags flag)
 {
     return((m_Flags & flag) != 0);
 }
Пример #5
0
		public bool GetFlag( StealthSkillScrollFlags flag )
		{
			return ( m_Flags & flag ) != 0;
		}
Пример #6
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			switch ( version )
			{
				case 1:
				{
					m_Flags = (StealthSkillScrollFlags)reader.ReadEncodedInt();
					m_ExpireDate = reader.ReadDateTime();
					goto case 0;
				}
				case 0:
				{
					m_SkillBonus = reader.ReadInt();
					break;
				}
			}

			//We save it just in case, then delete it afterwards
			if ( Expires && DateTime.UtcNow >= m_ExpireDate )
				AddToCleanup( this );
            SkillScroll.ConvertSkillScroll(this, m_OldSkills[0]);
		}