Beispiel #1
0
        public FightBB(int p, Apc apc)
            : base(p, apc)
        {
            ClapP = apc.Value.GetDoubleOrDefault("ClapP");
            int max = apc.Value.GetIntOrDefault("MaxCatch");
            MaxCatch = max == 0 ? int.MaxValue : max;

            string petid = apc.Value.GetStringOrDefault("PetID");
            GameConfig c = GameConfigAccess.Instance.FindOneById(petid);
            if (c != null) Rank = c.Value.GetIntOrDefault("PetsRank");
        }
Beispiel #2
0
        public FightApc(int p, Apc apc)
        {
            this.P = p;
            this.ID = ObjectId.GenerateNewId().ToString(); //Guid.NewGuid().ToString("N");
            this.m_apc = apc;
            this.m_ai = apc.Value.GetValueOrDefault<IList>("AI");
            this.Name = apc.Name;
            this.Level = apc.Level;
            this.Skin = apc.Skin;
            PlayerProperty property = new PlayerProperty();
            property.Add(apc.Value);
            this.Life = property;
            m_hp = property.ShengMing;
            m_mp = property.MoFa;

            if (m_apc.Value != null)
            {
                this.Talk = NewTalk(m_apc.Value.GetVariantOrDefault("Start"));
            }
        }