protected override void OnTarget(Mobile from, object targeted) { if (targeted is EtherealMount) { EtherealMount mount = targeted as EtherealMount; if (mount is GMEthereal) { from.SendMessage("You cannot use it on this!"); } else if (mount.IsChildOf(from.Backpack) && RewardSystem.CheckIsUsableBy(from, m_Tool, null)) { if (m_Table.ContainsKey(mount.GetType())) { EtherealEntry entry = m_Table[mount.GetType()]; if (mount.MountedID == entry.NormalID) { mount.MountedID = entry.TransparentID; from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored. } else { mount.MountedID = entry.NormalID; from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified. } if (mount.EtherealHue != 0 && mount.Hue == 0) { mount.EtherealHue = 0; } } else { if (mount.EtherealHue != EtherealMount.DefaultEtherealHue) { mount.EtherealHue = EtherealMount.DefaultEtherealHue; from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored. } else { mount.EtherealHue = mount.OriginalHue; from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified. } } mount.InvalidateProperties(); from.PlaySound(0x242); } } }
public static void AddProperty(EtherealMount mount, ObjectPropertyList list) { Type t = mount.GetType(); string cliloc = ""; if (m_Table.ContainsKey(t)) { cliloc = mount.MountedID == mount.DefaultMountedID ? "#1078520" : "#1153298"; } else { cliloc = mount.EtherealHue == EtherealMount.DefaultEtherealHue ? "#1078520" : "#1153298"; } list.Add(1113818, cliloc); }