Exemplo n.º 1
0
        public AnimatedItemEffect(int Source, int xSource, int ySource, int zSource, int ItemID, IHue Hue, int duration) : this(ItemID, Hue, duration)
        {
            Mobile source = World.FindMobile(Source);

            if (source != null)
            {
                base.SetSource(source);
                if ((!source.Player && !source.IsMoving) && (((xSource != 0) || (ySource != 0)) || (zSource != 0)))
                {
                    source.SetLocation((short)xSource, (short)ySource, (short)zSource);
                    source.Update();
                    source.UpdateReal();
                }
            }
            else
            {
                Item item = World.FindItem(Source);
                if (item != null)
                {
                    base.SetSource(item);
                    if (((xSource != 0) || (ySource != 0)) || (zSource != 0))
                    {
                        item.SetLocation((short)xSource, (short)ySource, (short)zSource);
                        item.Update();
                    }
                }
                else
                {
                    base.SetSource(xSource, ySource, zSource);
                }
            }
        }
Exemplo n.º 2
0
        public MovingEffect(int Source, int Target, int xSource, int ySource, int zSource, int xTarget, int yTarget, int zTarget, int ItemID, IHue Hue) : this(ItemID, Hue)
        {
            Mobile source = World.FindMobile(Source);

            if (source != null)
            {
                base.SetSource(source);
                if ((!source.Player && !source.IsMoving) && (((xSource != 0) || (ySource != 0)) || (zSource != 0)))
                {
                    source.SetLocation((short)xSource, (short)ySource, (short)zSource);
                    source.Update();
                    source.UpdateReal();
                }
            }
            else
            {
                Item item = World.FindItem(Source);
                if (item != null)
                {
                    base.SetSource(item);
                    if (((xSource != 0) || (ySource != 0)) || (zSource != 0))
                    {
                        item.SetLocation((short)xSource, (short)ySource, (short)zSource);
                        item.Update();
                    }
                }
                else
                {
                    base.SetSource(xSource, ySource, zSource);
                }
            }
            source = World.FindMobile(Target);
            if (source != null)
            {
                base.SetTarget(source);
                if ((!source.Player && !source.IsMoving) && (((xTarget != 0) || (yTarget != 0)) || (zTarget != 0)))
                {
                    source.SetLocation((short)xTarget, (short)yTarget, (short)zTarget);
                    source.Update();
                    source.UpdateReal();
                }
            }
            else
            {
                Item target = World.FindItem(Target);
                if (target != null)
                {
                    base.SetTarget(target);
                    if (((xTarget != 0) || (yTarget != 0)) || (zTarget != 0))
                    {
                        target.SetLocation((short)xTarget, (short)yTarget, (short)zTarget);
                        target.Update();
                    }
                }
                else
                {
                    base.SetTarget(xTarget, yTarget, zTarget);
                }
            }
        }