Exemplo n.º 1
0
        public static int TExpPet(BaseCreature bc)
        {
            XMLPetLevelAtt petxml = (XMLPetLevelAtt)XmlAttach.FindAttachment(bc, typeof(XMLPetLevelAtt));


            return(petxml.kxp + LevelCore.GetExp(bc));
        }
Exemplo n.º 2
0
        public static int Classic(Mobile from)
        {
            XMLPlayerLevelAtt xmlplayer = (XMLPlayerLevelAtt)XmlAttach.FindAttachment(from, typeof(XMLPlayerLevelAtt));
            PlayerMobile      pm        = from as PlayerMobile;

            int exp      = LevelCore.GetExp(pm);//LevelCore.Stats(pm) + LevelCore.Skills(pm);
            int ToLevell = (int)(xmlplayer.Levell * 100);
            int highest  = 100;

            if (Cl.Enabled)
            {
                if (exp >= ToLevell && xmlplayer.Levell != highest)
                {
                    xmlplayer.Levell  += 1;
                    xmlplayer.ToLevell = (int)(xmlplayer.Levell * 100);

                    if (exp >= ToLevell)
                    {
                        LevelHandler.Classic(pm);
                    }

                    return(exp);
                }
                return(exp);
            }
            return(0);
        }
Exemplo n.º 3
0
        public static int TExp(Mobile m)
        {
            XMLPlayerLevelAtt xmlplayer = (XMLPlayerLevelAtt)XmlAttach.FindAttachment(m, typeof(XMLPlayerLevelAtt));
            PlayerMobile      pm        = m as PlayerMobile;

            if (Cl.Enabled)
            {
                return(LevelHandler.Classic(pm));
            }
            else if (En.Enabled)
            {
                return(xmlplayer.kxp + LevelCore.GetExp(pm));
            }
            else
            {
                return(xmlplayer.kxp);
            }
        }