예제 #1
0
 public void ComputeLevel(xhorse x)
 {
     if (!Controlled)
     {
         return;
     }
     if (x.exp >= 1000 + 20 * x.level)
     {
         x.exp -= 1000 + 20 * x.level;
         ++x.level;
         x.Emote("*LEVEL UP*");
         valid += (short)Utility.Random(3, 3);
     }
     if (x.level > 100)
     {
         ++x.generation; x.level = 1; x.Emote("*大于一百级,阶段上升*");
     }
     DaMin = generation + 5;
     DaMax = generation + 10;
 }
예제 #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
        }