static EtherealRetouchingTool() { m_Table = new Dictionary <Type, EtherealEntry>(); m_Table[typeof(EtherealHorse)] = new EtherealEntry(0x3EA0, 0x3EAA); m_Table[typeof(EtherealLlama)] = new EtherealEntry(0x3EA6, 0x3EAB); m_Table[typeof(EtherealOstard)] = new EtherealEntry(0x3EA5, 0x3EAC); m_Table[typeof(EtherealRidgeback)] = new EtherealEntry(0x3EBA, 0x3E9A); m_Table[typeof(EtherealUnicorn)] = new EtherealEntry(0x3EB4, 0x3E9B); m_Table[typeof(EtherealBeetle)] = new EtherealEntry(0x3EBC, 0x3E97); m_Table[typeof(EtherealKirin)] = new EtherealEntry(0x3EAD, 0x3E9C); m_Table[typeof(EtherealSwampDragon)] = new EtherealEntry(0x3EBD, 0x3E98); }
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); } } }