public override void OnResponse(NetState sender, RelayInfo info) { if (info.ButtonID >= 100 && info.ButtonID <= 100 + m_Entries.Length) { int mana = m_Spell.ScaleMana(m_Spell.RequiredMana); if (mana > m_Caster.Mana) { m_Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. } else { int entryID = info.ButtonID - 100; if (AnimalForm.Morph(m_Caster, entryID) == MorphResult.Fail) { m_Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. m_Caster.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist); m_Caster.PlaySound(0x5C); } else { m_Caster.Mana -= mana; } } } }
public override void OnResponse(NetState sender, RelayInfo info) { int entryID = info.ButtonID - 1; if (entryID < 0 || entryID >= m_Entries.Length) { return; } int mana = m_Spell.ScaleMana(m_Spell.RequiredMana); AnimalFormEntry entry = AnimalForm.Entries[entryID]; if (mana > m_Caster.Mana) { m_Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. } else if (BaseFormTalisman.EntryEnabled(sender.Mobile, entry.Type)) { if (AnimalForm.Morph(m_Caster, entryID) == MorphResult.Fail) { m_Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. m_Caster.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist); m_Caster.PlaySound(0x5C); } else { m_Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist); m_Caster.Mana -= mana; } } }
public override void OnResponse(NetState sender, RelayInfo info) { if (info.ButtonID == 1 && info.Switches.Length > 0) { int entryID = info.Switches[0] - 100; if (AnimalForm.Morph(m_Caster, entryID) == MorphResult.Fail) { m_Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. m_Caster.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist); m_Caster.PlaySound(0x5C); } } }
public override void OnResponse(NetState sender, RelayInfo info) { int entryID = info.ButtonID - 1; if (entryID < 0 || entryID >= AnimalForm.Entries.Length) { return; } int mana = m_Spell.ScaleMana(m_Spell.RequiredMana); AnimalFormEntry entry = AnimalForm.Entries[entryID]; if (mana > m_Caster.Mana) { m_Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. } else if ((m_Caster is PlayerMobile) && (m_Caster as PlayerMobile).MountBlockReason != BlockMountType.None) { m_Caster.SendLocalizedMessage(1063108); // You cannot use this ability right now. } else if (BaseFormTalisman.EntryEnabled(sender.Mobile, entry.Type)) { #region Dueling if (m_Caster is PlayerMobile && ((PlayerMobile)m_Caster).DuelContext != null && !((PlayerMobile)m_Caster).DuelContext.AllowSpellCast(m_Caster, m_Spell)) { } #endregion else if (AnimalForm.Morph(m_Caster, entryID) == MorphResult.Fail) { m_Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. m_Caster.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist); m_Caster.PlaySound(0x5C); } else { m_Caster.FixedParticles(0x3728, 10, 13, 2023, EffectLayer.Waist); m_Caster.Mana -= mana; } } }
public override void OnResponse(GameClient sender, RelayInfo info) { if (!m_Spell.CheckCast()) { return; } if (info.ButtonID >= 100) { int entryID = info.ButtonID - 100; if (AnimalForm.Morph(m_Caster, entryID) == MorphResult.Fail) { m_Caster.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502632); // The spell fizzles. m_Caster.FixedParticles(0x3735, 1, 30, 9503, EffectLayer.Waist); m_Caster.PlaySound(0x5C); } else { m_Spell.ConsumeMana(); } } }
public override void OnResponse(NetState sender, RelayInfo info) { if (info.ButtonID == 1 && info.Switches.Length > 0) { int cnum = info.Switches[0]; switch (cnum) { case 101: { AnimalForm.Morph(from, 0x84); // kirin break; } case 102: { AnimalForm.Morph(from, 0x7A); // unikorn break; } case 103: { AnimalForm.Morph(from, 0xF6); // bake kitsune break; } case 104: { AnimalForm.Morph(from, 0x19); // wolf break; } case 105: { AnimalForm.Morph(from, 0xDC); // llama break; } case 106: { AnimalForm.Morph(from, 0xDA); // ostard break; } case 107: { AnimalForm.Morph(from, 0x51); // bullfrog break; } case 108: { AnimalForm.Morph(from, 0x15); // giant serpent break; } case 109: // dog { AnimalForm.Morph(from, 0xD9); break; } case 110: { AnimalForm.Morph(from, 0xC9); // cat break; } case 111: { AnimalForm.Morph(from, 0xEE); // rat break; } case 112: { AnimalForm.Morph(from, 0xCD); // rabbit break; } } } }