コード例 #1
0
            protected override void OnTarget(Mobile from, object o)
            {
                if (o is TrapableContainer)
                {
                    m_Owner.Target((TrapableContainer)o);
                }
                else if (from == o)
                {
                    if (m_Owner.CheckSequence())
                    {
                        ArrayList targets = new ArrayList();
                        foreach (Item item in World.Items.Values)
                        {
                            if (item is TrapWand)
                            {
                                TrapWand myWand = (TrapWand)item;
                                if (myWand.owner == from)
                                {
                                    targets.Add(item);
                                }
                            }
                        }
                        for (int i = 0; i < targets.Count; ++i)
                        {
                            Item item = ( Item )targets[i];
                            item.Delete();
                        }

                        from.PlaySound(0x1ED);
                        from.FixedParticles(0x376A, 9, 32, 5008, Server.Items.CharacterDatabase.GetMySpellHue(from, 0), 0, EffectLayer.Waist);
                        from.SendMessage("You summon a magical wand into your pack.");
                        Item iWand  = new TrapWand(from);
                        int  nPower = (int)(from.Skills[SkillName.Magery].Value / 2) + 25;
                        if (nPower > 100)
                        {
                            nPower = 100;
                        }
                        TrapWand xWand = (TrapWand)iWand;
                        xWand.WandPower = nPower;
                        from.AddToBackpack(xWand);
                    }
                    m_Owner.FinishSequence();
                }
                else
                {
                    from.SendMessage("This spell has no effect on that!");
                }
            }
コード例 #2
0
 protected override void OnTargetFinish(Mobile from)
 {
     m_Owner.FinishSequence();
 }