Esempio n. 1
0
        public void Target(IPoint3D target)
        {
            if (!Caster.CanSee(target))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (!CheckLineOfSight(target))
            {
                this.DoFizzle();
                Caster.SendAsciiMessage("Target is not in line of sight");
            }
            if (CheckSequence())
            {
                FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
                Item     food     = foodInfo.Create();

                food.MoveToWorld(new Point3D(target), Caster.Map);

                // Sphere don't show any message when food is created

                Caster.FixedParticles(0, 10, 5, 2003, EffectLayer.RightHand);
                Caster.PlaySound(0x1E2);
            }

            FinishSequence();
        }
Esempio n. 2
0
        public void Target(IPoint3D p)
        {
            if (!Caster.CanSee(p))
            {
                Caster.SendAsciiMessage("Target is not in line of sight.");
                DoFizzle();
            }
            else if (CheckSequence())
            {
                FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
                Item     food     = foodInfo.Create();
                Point3D  loc      = new Point3D(p);

                if (food != null)
                {
                    food.MoveToWorld(loc, Caster.Map);

                    // You magically create food in your backpack:
                    Caster.SendAsciiMessage("You create " + foodInfo.Name);

                    Caster.FixedParticles(0, 10, 5, 2003, EffectLayer.RightHand);
                    Caster.PlaySound(Sound);
                }
            }

            FinishSequence();
        }
Esempio n. 3
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
                Item     food     = foodInfo.Create();

                if (food != null)
                {
                    Caster.Target = new InternalTarget(Caster, food);
                }
            }

            FinishSequence();
        }
Esempio n. 4
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
                Item     food     = foodInfo.Create();

                if (food != null)
                {
                    Caster.AddToBackpack(food);

                    // You magically create food in your backpack:
                    Caster.SendLocalizedMessage(1042695, true, " " + foodInfo.Name);

                    Caster.FixedParticles(0, 10, 5, 2003, EffectLayer.RightHand);
                    Caster.PlaySound(0x1E2);
                }
            }

            FinishSequence();
        }
Esempio n. 5
0
        public override void OnCast()
        {
            if (CheckSequence())
            {
                FoodInfo foodInfo = m_Food[Utility.Random(m_Food.Length)];
                Item     food     = foodInfo.Create();

                if (food != null)
                {
                    Caster.AddToBackpack(food);
                    Caster.AddToBackpack(new WaterFlask());

                    // You magically create food in your backpack:
                    //Caster.SendLocalizedMessage( 1042695, true, " " + foodInfo.Name );
                    Caster.SendMessage("Some food and drink magically appear in your backpack.");

                    Caster.FixedParticles(0, 10, 5, 2003, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0), 0, EffectLayer.RightHand);
                    Caster.PlaySound(0x1E2);
                }
            }

            FinishSequence();
        }