コード例 #1
0
        public EnhancedSpellbookTome() : base(0x0FBD)
        {
            Hue = 101;

            string[] types = Enum.GetNames(typeof(EnhancedSpellbookType));
            int      iType = Utility.Random(types.Length);
            string   e     = types[iType];

            EnhancedSpellbookType type = (EnhancedSpellbookType)Enum.Parse(typeof(EnhancedSpellbookType), e, true);

            if (type == null)
            {
                Delete();

                return;
            }

            else
            {
                m_EnhancedSpellbookType = type;
            }

            if (type == EnhancedSpellbookType.Slayer)
            {
                m_SlayerGroup = BaseCreature.GetRandomSlayerType();
            }
        }
コード例 #2
0
        public EnhancedSpellbookTome(EnhancedSpellbookType tomeType, SlayerGroupType slayerGroupType) : base(0x0FBD)
        {
            Hue = 101;

            if (tomeType == null)
            {
                Delete();

                return;
            }

            else
            {
                m_EnhancedSpellbookType = tomeType;
                m_SlayerGroup           = slayerGroupType;
            }

            if (m_SlayerGroup == null || m_SlayerGroup == SlayerGroupType.None)
            {
                Delete();
            }

            else
            {
                m_SlayerGroup = slayerGroupType;
            }
        }
コード例 #3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadEncodedInt();

            //Version 0
            if (version >= 0)
            {
                m_EnhancedSpellbookType = (EnhancedSpellbookType)reader.ReadInt();
                m_SlayerGroup           = (SlayerGroupType)reader.ReadInt();
            }
        }
コード例 #4
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            if (version >= 0)
            {
                m_Quality     = (BookQuality)reader.ReadInt();
                m_SlayerGroup = (SlayerGroupType)reader.ReadInt();
                m_Content     = reader.ReadULong();
                m_Count       = reader.ReadInt();
            }
        }
コード例 #5
0
        public EnhancedSpellbookTome(EnhancedSpellbookType tomeType) : base(0x0FBD)
        {
            Hue = 101;

            if (tomeType == null)
            {
                Delete();

                return;
            }

            m_EnhancedSpellbookType = tomeType;

            if (m_EnhancedSpellbookType == EnhancedSpellbookType.Slayer)
            {
                m_SlayerGroup = BaseCreature.GetRandomSlayerType();
            }
        }
コード例 #6
0
        public EnhancedSpellbook(EnhancedSpellbookType type, SlayerGroupType slayerGroupType) : this((ulong)0)
        {
            Hue = 101;

            LootType = Server.LootType.Regular;
            Layer    = Layer.OneHanded;

            if (type == null)
            {
                return;
            }

            EnhancedType = type;

            m_ChargesRemaining = Utility.RandomMinMax(200, 300);

            if (EnhancedType != null && EnhancedType == EnhancedSpellbookType.Slayer)
            {
                SlayerGroup = slayerGroupType;
            }
        }