Exemplo n.º 1
0
        public PeopleDrop(int id)
        {
            peopleConfig = ConfigData.GetPeopleConfig(id);

            DropResource gold = new DropResource();
            gold.id = 1;
            gold.percent = 100;
            gold.min = PeopleBook.IsPeople(id) ? peopleConfig.Level : peopleConfig.Level * 3 + 12;
            gold.max = PeopleBook.IsPeople(id) ? peopleConfig.Level * 3 / 2 : peopleConfig.Level * 5 + 20;
            resources.Add(gold);
            foreach (int rid in peopleConfig.Reward)
            {
                DropResource drop = new DropResource();
                drop.id = rid;
                drop.percent = drop.id <= 3 ? peopleConfig.Level * 5 / 4 + 5 : peopleConfig.Level / 2 + 2;
                drop.min = 1;
                drop.max = 1;
                resources.Add(drop);
            }
        }
Exemplo n.º 2
0
        public PeopleDrop(int id)
        {
            peopleConfig = ConfigData.GetPeopleConfig(id);
            uint         goldExpect = GameResourceBook.InGoldFight(peopleConfig.Level, PeopleBook.IsPeople(id));
            DropResource gold       = new DropResource
            {
                Id      = 1,
                Percent = 100,
                Min     = goldExpect * 7 / 10,
                Max     = goldExpect * 13 / 10
            };

            resources.Add(gold);
            foreach (int rid in peopleConfig.Reward)
            {
                DropResource drop = new DropResource {
                    Id = rid
                };
                drop.Percent = (uint)(drop.Id <= 3 ? peopleConfig.Level * 5 / 4 + 5 : peopleConfig.Level / 2 + 2);
                drop.Min     = 1;
                drop.Max     = 1;
                resources.Add(drop);
            }
        }