public override void OnResponse( NetState sender, RelayInfo info )
        {
            int idx = info.ButtonID - 1;

            if ( idx < 0 || idx >= m_Entries.Length )
                return;

            Spell spell = new PolymorphSpell( m_Caster, m_Scroll, m_Entries[idx].BodyID );
            spell.Cast();
        }
        public override void OnResponse( NetState state, RelayInfo info )
        {
            if ( info.ButtonID == 1 && info.Switches.Length > 0 )
            {
                int cnum = info.Switches[0];
                int cat = cnum%256;
                int ent = cnum>>8;

                if ( cat >= 0 && cat < Categories.Length )
                {
                    if ( ent >= 0 && ent < Categories[cat].Entries.Length )
                    {
                        Spell spell = new PolymorphSpell( m_Caster, m_Scroll, Categories[cat].Entries[ent].BodyID );
                        spell.Cast();
                    }
                }
            }
        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            int buttonID = info.ButtonID;

            if (buttonID < 100)
                return;

            int page = (buttonID > 110) ? 1 : 0;

            switch (page)
            {
                case 1:
                    {
                        PolymorphEntry pe = SecondPageEntries[buttonID - 111] as PolymorphEntry;

                        Spell spell = new PolymorphSpell(m_Caster, m_Scroll, pe.BodyID);
                        spell.Cast();

                        break;
                    }
                case 0:
                    {
                        PolymorphEntry pe = FirstPageEntries[buttonID - 101] as PolymorphEntry;

                        Spell spell = new PolymorphSpell(m_Caster, m_Scroll, pe.BodyID);
                        spell.Cast();

                        break;
                    }
            }
        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            if (info.ButtonID == 1 && info.Switches.Length > 0)
            {
                int cnum = info.Switches[0];
                int cat = cnum % 256;
                int ent = cnum >> 8;

                if (cat >= 0 && cat < Categories.Length)
                {
                    if (ent >= 0 && ent < Categories[cat].Entries.Length)
                    {
                        if (m_Caster.Skills[SkillName.Magery].Base < Categories[cat].Entries[ent].SkillRequired)
                            m_Caster.SendAsciiMessage("You are not skilled enough to polymorph into this");
                        else
                        {
                            Spell spell = new PolymorphSpell(m_Caster, m_Scroll, Categories[cat].Entries[ent]);
                            spell.Cast();
                        }
                    }
                }
            }
        }
Beispiel #5
0
 public override void OnResponse(NetState state, int index)
 {
     Spell spell = new PolymorphSpell(m_Caster, m_Scroll, Categories[0].Entries[index].BodyID);
     spell.Cast();
 }