Пример #1
0
        protected override void Compile()
        {
            if (_Displaying == 0x0)
            {
                if (SpellIcons.IsSmallIcon(Icon) && DisplaySmall)
                {
                    _Displaying = 0x1;
                }
                else if (SpellIcons.IsLargeIcon(Icon) && DisplayLarge)
                {
                    _Displaying = 0x2;
                }
                else
                {
                    _Displaying = DisplaySmall ? 0x1 : DisplayLarge ? 0x2 : 0x0;
                }
            }

            if (_Displaying == 0x1 && !DisplaySmall)
            {
                _Displaying = DisplayLarge ? 0x2 : 0x0;
            }

            if (_Displaying == 0x2 && !DisplayLarge)
            {
                _Displaying = DisplaySmall ? 0x1 : 0x0;
            }

            base.Compile();
        }
Пример #2
0
        public static void Initialize()
        {
            Spell     s;
            SpellInfo o;
            Type      t;

            for (int i = 0, j = 8320; i < SpellRegistry.Types.Length; i++, j++)
            {
                s = SpellRegistry.NewSpell(i, null, null);

                if (s == null)
                {
                    continue;
                }

                o = s.Info;

                if (o == null)
                {
                    continue;
                }

                t = SpellRegistry.Types[i] ?? s.GetType();

                SpellsInfo[t] = new SpellInfo(
                    o.Name,
                    o.Mantra,
                    o.Action,
                    o.LeftHandEffect,
                    o.RightHandEffect,
                    o.AllowTown,
                    o.Reagents);

                if (SpellIcons.IsItemIcon(j))
                {
                    ItemSpellIcons[t] = j;
                }
            }

            InvalidateTreeStructure();
        }
Пример #3
0
 public static IconDefinition SpellIcon(int hue)
 {
     return(FromGump(SpellIcons.RandomIcon(), hue));
 }
Пример #4
0
 public static IconDefinition LargeSpellIcon(int hue, int offsetX, int offsetY)
 {
     return(FromGump(SpellIcons.RandomLargeIcon(), hue, offsetX, offsetY));
 }
Пример #5
0
 public static IconDefinition LargeSpellIcon()
 {
     return(FromGump(SpellIcons.RandomLargeIcon()));
 }
Пример #6
0
 public static IconDefinition SmallSpellIcon(int offsetX, int offsetY)
 {
     return(FromGump(SpellIcons.RandomSmallIcon(), offsetX, offsetY));
 }
Пример #7
0
 public static IconDefinition SmallSpellIcon()
 {
     return(FromGump(SpellIcons.RandomSmallIcon()));
 }
Пример #8
0
 public static IconDefinition ItemSpellIcon(int hue, int offsetX, int offsetY)
 {
     return(FromItem(SpellIcons.RandomItemIcon(), hue, offsetX, offsetY));
 }
Пример #9
0
 public static IconDefinition ItemSpellIcon(int hue)
 {
     return(FromItem(SpellIcons.RandomItemIcon(), hue));
 }