Beispiel #1
0
        public override bool OnBeforeDeath()
        {
            //if (Mounted)
            //    Dismount(this);
            polymorph(719, this);
            if (ControlMaster != null && this.ControlMaster.HasGump(typeof(Luckgump)))
            {
                ControlMaster.CloseGump(typeof(Luckgump));
            }
            PackAnimal.CombineBackpacks(this);
            //if  (Utility.Random(10)<1)
            //GoldShower.DoForChamp(Location, Map);
            if (!Controlled)
            {
                baodongxi.bao(this as BaseCreature);
            }

            return(base.OnBeforeDeath());
        }
Beispiel #2
0
        public void polymorph(int bodyid, xhorse m)
        {
            if (!Controlled || IsDeadPet || IsDeadBondedPet || ControlMaster == null)
            {
                return;
            }
            if (ControlMaster.HasGump(typeof(xhgump)))
            {
                ControlMaster.CloseGump(typeof(xhgump));
            }
            m.PlaySound(0x20C);
            if (Mounted)
            {
                Dismount(this);
            }

            if (bodyid == 0x191)
            {
                m.BodyMod = 0x191;
                m.HueMod  = 1009;
                if (Race != Race.Elf)
                {
                    Race = Race.Elf;
                }
                //FixedParticles(0x3728, 200, 25, 9942, EffectLayer.Waist);
                Effects.SendBoltEffect(m, true, 0, true);//Lighting
                m.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist);

                if (m.Controlled && CanPaperdollBeOpenedBy(ControlMaster) && m.Alive)
                {
                    if (m.ControlMaster.Alive)
                    {
                        m.ControlMaster.SendGump(new xhgump(ControlMaster, m));
                    }
                }
                return;
            }
            if (bodyid == 0xbe)

            {
                m.BodyMod = 0;
                m.HueMod  = -1;
                //FixedParticles(0x3728, 200, 25, 9942, EffectLayer.Waist);
                m.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist); //黄色环绕
                m.FixedParticles(0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist);   //刺球

                return;
            }
            else
            {
                m.BodyMod = bodyid;
                m.HueMod  = -1;
                //FixedParticles(0x3728, 200, 25, 9942, EffectLayer.Waist);
                m.FixedParticles(0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist);
                m.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist);//黄色环绕

                return;
            }
            #region old polymorph
            //if (Mounted)
            //    Dismount(this);

            //if (BodyMod == 0)
            //{
            //    if (bodyid == 0x191)
            //        m.HueMod = 1009;
            //    else
            //        m.HueMod = -1;
            //    if (Mounted)
            //        Dismount(this);

            //    m.PlaySound(0x20C);
            //    m.Body = bodyid;
            //    FixedParticles(0x3728, 200, 25, 9942, EffectLayer.Waist);
            //}
            #endregion old
        }