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(); }
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(); }
public static IconDefinition SpellIcon(int hue) { return(FromGump(SpellIcons.RandomIcon(), hue)); }
public static IconDefinition LargeSpellIcon(int hue, int offsetX, int offsetY) { return(FromGump(SpellIcons.RandomLargeIcon(), hue, offsetX, offsetY)); }
public static IconDefinition LargeSpellIcon() { return(FromGump(SpellIcons.RandomLargeIcon())); }
public static IconDefinition SmallSpellIcon(int offsetX, int offsetY) { return(FromGump(SpellIcons.RandomSmallIcon(), offsetX, offsetY)); }
public static IconDefinition SmallSpellIcon() { return(FromGump(SpellIcons.RandomSmallIcon())); }
public static IconDefinition ItemSpellIcon(int hue, int offsetX, int offsetY) { return(FromItem(SpellIcons.RandomItemIcon(), hue, offsetX, offsetY)); }
public static IconDefinition ItemSpellIcon(int hue) { return(FromItem(SpellIcons.RandomItemIcon(), hue)); }