示例#1
0
        public bool Sell(int itemId, int quantity)
        {
            equipmentDal.Get(myHero);
            if (!CanSell(itemId, quantity))
            {
                return(false);
            }

            var item = itemDal.Read(itemId);

            heroService.AddMoney((int)((double)item.Price * 0.8), myHero);
            heroDal.Update(myHero);
            eqService.RemoveItem(itemId, myHero, quantity);
            return(true);
        }
 public void Win(Quest quest)
 {
     heroService.AddMoney(quest.Money, myHero);
     heroService.AddExperience(quest.Experience, myHero);
     AddLot();
 }