public BidHouseItem(Character owner, int guid, ItemTemplate template, List <EffectBase> effects, uint stack, uint price, DateTime sellDate) { Record = new BidHouseItemRecord // create the associated record { Id = guid, OwnerId = owner.Id, Template = template, Stack = stack, Price = price, Effects = effects, SellDate = sellDate }; }
public BidHouseItem CreateBidHouseItem(Character character, BasePlayerItem item, int amount, uint price) { if (amount < 0) { throw new ArgumentException("amount < 0", "amount"); } var guid = BidHouseItemRecord.PopNextId(); var record = new BidHouseItemRecord // create the associated record { Id = guid, OwnerId = character.Account.Id, Price = price, SellDate = DateTime.Now, Template = item.Template, Stack = (uint)amount, Effects = new List <EffectBase>(item.Effects), IsNew = true }; return(new BidHouseItem(record)); }