public override void GiveGift(Mobile mob) { GiftBox box = new GiftBox(); box.DropItem(new MistletoeDeed()); box.DropItem(new PileOfGlacialSnow()); box.DropItem(new LightOfTheWinterSolstice()); int random = Utility.Random(100); if (random < 60) { box.DropItem(new DecorativeTopiary()); } else if (random < 84) { box.DropItem(new FestiveCactus()); } else { box.DropItem(new SnowyTree()); } switch (GiveGift(mob, box)) { case GiftResult.Backpack: mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your backpack."); break; case GiftResult.BankBox: mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your bank box."); break; } }
public override void GiveGift(Mobile mob) { GiftBox box = new GiftBox(); box.Hue = Utility.RandomList(124, 1166); box.DropItem(new EasterBonnet2009()); box.DropItem(new ChocolateEasterBunny2009()); box.DropItem(new EasterCard2009()); box.DropItem(new EasterCarrot2009()); box.DropItem(new BagOfJellyBeans()); box.DropItem(new EasterLily2009()); box.DropItem(new BubbleGumEasterGrass2009()); box.DropItem(new MarshmallowPeep2009()); switch (GiveGift(mob, box)) { case GiftResult.Backpack: mob.SendMessage(0x482, "Happy Easter! from the Staff of COV! Gift items have been placed in your backpack."); break; case GiftResult.BankBox: mob.SendMessage(0x482, "Happy Easter! from the Staff of COV! Gift items have been placed in your bank box."); break; } }
private Container CreateRewardContainer() { Container rewardCont = new GiftBox(); if (m_bUseRandom) { for (int i = 0; i < m_iRandomNum; i++) { int iArrayLoc = m_iRandomRangeMax; if (m_iRandomRangeMax > m_alList.Count) { m_iRandomRangeMax = m_alList.Count; } AddRewardToContainer(rewardCont, (RewardEntry)m_alList[Utility.Random(m_iRandomRangeMax)]); } for (int i = m_iRandomRangeMax; i < m_alList.Count; i++) { AddRewardToContainer(rewardCont, (RewardEntry)m_alList[i]); } } else { foreach (RewardEntry entry in m_alList) { AddRewardToContainer(rewardCont, entry); } } return(rewardCont); }
/// <inheritdoc /> public Container Convert(ItemDTO value, object state) { var entity = new GiftBox(); this.Merge(entity, value, state); return(entity); }
public async Task <McpResponse> GiftCatalogEntry(OAuthSession oAuthSession, GiftBox box, string message, int quantity = 1, int revision = -1, params string[] accountIds) => await FortniteService.GiftCatalogEntry(oAuthSession, new GiftCatalogEntry { OfferId = OfferId, PurchaseQuantity = quantity, Currency = Prices[0].CurrencyType, CurrencySubType = Prices[0].CurrencySubType, ExpectedTotalPrice = Prices[0].FinalPrice, ReceiverAccountIds = accountIds, GiftWrapTemplateId = box, PersonalMessage = message }, revision);
private void Start() { if (Instance == null) { Instance = this; } else { DestroyImmediate(gameObject); } UIController.Instance.ShowStickerBook += ObtainGift; GameController.Instance.GameControllerReady += IntiGiftBox; giftBoxButton.onClick.AddListener(OpenGiftBox); giftBoxButton.gameObject.SetActive(false); }
public override void GiveGift(Mobile mob) { GiftBox box = new GiftBox(); box.DropItem(new PlentifulHarvest()); box.DropItem(new RoastedTurkey()); switch (GiveGift(mob, box)) { case GiftResult.Backpack: mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your backpack."); break; case GiftResult.BankBox: mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your bank box."); break; } }
public bool CreateGiftBox(GiftBoxCreate model) { var entity = new GiftBox() { GiftBoxUser = _userId, Occasion = model.Occasion, Butterflies = model.Butterflies, Pictures = model.Pictures, Roses = model.Roses, NumInInventory = model.NumInInventory, CakeId = model.CakeId }; using (var ctx = new ApplicationDbContext()) { ctx.GiftBoxes.Add(entity); return(ctx.SaveChanges() == 1); } }
public override void GiveGift(Mobile mob) { GiftBox bag = new GiftBox(); bag.DropItem(new HarvestWine()); bag.DropItem(new MurkyMilk(BeverageType.Milk)); bag.DropItem(new CreepyCake()); bag.DropItem(new MrPlainsCookies()); bag.DropItem(new SmallHalloweenWeb()); switch (GiveGift(mob, bag)) { case GiftResult.Backpack: mob.SendMessage(String.Format("Have a creepy Halloween 2011 from the entire {0} Staff Team. We have placed a goddie bag for you in your backpack.", Core.Config.ServerName)); break; case GiftResult.BankBox: mob.SendMessage(String.Format("Have a creepy Halloween 2011 from the entire {0} Staff Team. We have placed a goddie bag for you in your bank box.", Core.Config.ServerName)); break; } }
public override void GiveGift(Mobile mob) { GiftBox box = new GiftBox(); box.DropItem(new MistletoeDeed2008()); box.DropItem(new PileOfGlacialSnow2008()); box.DropItem(new SnowPile2008()); box.DropItem(new LightOfTheWinterSolstice2008()); box.DropItem(new DecorativeTopiary2008()); box.DropItem(new FestiveCactus2008()); box.DropItem(new SnowyTree2008()); box.DropItem(new RedStockin()); box.DropItem(new SantasSleighDeed()); box.DropItem(new CandyCane()); box.DropItem(new HolidayBell2008()); box.DropItem(new SnowGlobe2008()); box.DropItem(new HolidayBell2008()); box.DropItem(new Snowman2008()); box.DropItem(new RedPoinsettia()); box.DropItem(new WhitePoinsettia()); box.DropItem(new HolidayTreeDeed()); box.DropItem(new CandyCane()); box.DropItem(new GingerBreadCookie()); box.DropItem(new GingerbreadHouseAddonDeed()); switch (GiveGift(mob, box)) { case GiftResult.Backpack: mob.SendMessage(0x482, "Happy Holidays from the staff! Gift items have been placed in your backpack."); break; case GiftResult.BankBox: mob.SendMessage(0x482, "Happy Holidays from the staff! Gift items have been placed in your bank box."); break; } }
// Implement this method in a buddy class to set properties that are specific to 'GiftBox' (if any) partial void Merge(GiftBox entity, ItemDTO dto, object state);
public void TestMethod2R() { GiftBox box = new GiftBox(1, 1, 10); Assert.AreEqual(14, box.FeedRibbonNeeded()); }
public override bool OnDragDrop(Mobile from, Item dropped) { BankBox box = from.BankBox; if (box == null) { return(false); } if (dropped is HolidayDeed) { if (message != null) { SayTo(from, message); } Item random = null; int randomitem = Utility.RandomMinMax(0, 3); if (randomitem == 0) { random = new Snowman(); random.Name = "snowman"; } if (randomitem == 1) { random = new SnowPile(); } if (randomitem == 2) { random = new EternalEmbers(); } if (randomitem == 3) { if (Utility.RandomBool()) { random = new RedPoinsettia(); } else { random = new WhitePoinsettia(); } random.Name = "poinsettia"; } Item roast = new RoastPig(); roast.Name = "roast pig"; Item candle = new CandleLong(); candle.Name = "candle"; candle.Hue = Utility.RandomList(0, 3343, 72, 7, 1274, 53); Item cookie = new Cookies(); cookie.Name = "Christmas cookies"; GiftBox Giftbox = new GiftBox(); string year = DateTime.Now.Year.ToString(); string Signature = "Christmas " + year; Giftbox.Name = Signature; roast.Name += " - " + Signature; Giftbox.DropItem(roast); candle.Name += " - " + Signature; Giftbox.DropItem(candle); random.Name += " - " + Signature; Giftbox.DropItem(random); cookie.Name += " - " + Signature; Giftbox.DropItem(cookie); //drop it all to bank // Adam: This method fails if the bank is full! // box.TryDropItem( from, Giftbox, false ); // this one won't box.AddItem(Giftbox); //delete deed. dropped.Delete(); return(true); } else //if not a holiday deed dont accept anything { return(false); } }
static void Main(string[] args) { SystemConsole.WriteLine("Hello World!"); foreach (IFactory factory in Factories) { IFactoryObject factoryObject = factory.MakeObject(); factoryObject.PrintSelf(); } IBuiltObject builtObject1 = new Builder(_logger) .Start() .Annoying() .Loud() .WithColor(ConsoleColor.Green) .Build(); IBuiltObject builtObject2 = new Builder(_logger) .Start() .Quiet() .WithColor(ConsoleColor.Yellow) .Build(); builtObject1.PrintSelf(); builtObject2.PrintSelf(); foreach (IFactoryMethod factoryMethod in FactoryMethods) { IFactoryObject factoryObject = factoryMethod.CreateObject(); factoryObject.PrintSelf(); } IPrototype prototype = Prototype.InitialPrototype.Clone(); for (int i = 0; i < 10; ++i) { SystemConsole.WriteLine($"prototype #{prototype.Id} copied"); prototype = prototype.Clone(); } Singleton singleton = Singleton.Instance; SystemConsole.WriteLine($"Singleton created at {singleton.CreationDateTime}"); DivisionResult <int> divisionResult = _multiplyDivideAdapter.Divide(10, 3); SystemConsole.WriteLine($"{nameof(MultiplyDivideAdapter)}: 10 / 3 = {divisionResult.WholePart} with remainder {divisionResult.Remainder}"); int multiplicationResult = _multiplyDivideAdapter.Multiply(10, 3); SystemConsole.WriteLine($"{nameof(MultiplyDivideAdapter)}: 10 x 3 = {multiplicationResult}"); _logger.Log("Turn on hot"); _hotWaterPipeBridge.TurnOn(); _logger.Log("Turn off hot"); _hotWaterPipeBridge.TurnOff(); _logger.Log("Sprinkling hot"); _hotWaterPipeBridge.Sprinkle(); _logger.Log("Turn on cold"); _coldWaterPipeBridge.TurnOn(); _logger.Log("Turn off cold"); _coldWaterPipeBridge.TurnOff(); _logger.Log("Sprinkling cold"); _coldWaterPipeBridge.Sprinkle(); _TraverseCompositeTree(_composite); _logger.Log($"It seems we have a gift! First let's unwrap the {_wrapper.GetType().Name}"); GiftBox giftBox = (_wrapper as WrappingPaper).Unwrap(); _logger.Log($"We have the {giftBox.GetType().Name} open, now let's take our gift out."); Gift gift = giftBox.Open(); _logger.Log($"The gift is a {gift.Name}!"); _logger.Log($"Random divided numbers from facade: {_facade.GetRandomNumbersAndDivideThem()}"); _logger.Log($"Random multiplied numbers from facade: {_facade.GetRandomNumbersAndMultiplyThem()}"); SystemConsole.ReadLine(); }
public void TestMethod1() { GiftBox box = new GiftBox(2, 3, 4); Assert.AreEqual(58, box.WrappingNeeded()); }
public override void GiveGift(Mobile mob) { GiftBox box = new GiftBox(); box.Hue = Utility.RandomList(38, 1166); box.DropItem(new PinkChampagne()); box.DropItem(new ChampagneFlute()); box.DropItem(new CandleOfLove1()); box.DropItem(new ValCandy()); box.DropItem(new ValCandy()); box.DropItem(new ValCandy()); box.DropItem(new ValCandy()); box.DropItem(new ValCandy()); LongStemRose rose = new LongStemRose(); rose.Name = "a whispering rose from " + mob.Name; box.DropItem(rose); ValCandy candy = new ValCandy(); candy.Name = "Valentine's Candy from " + mob.Name; box.DropItem(candy); ValCandy candy1 = new ValCandy(); candy1.Name = "Valentine's Candy from " + mob.Name; box.DropItem(candy1); ValCandy candy2 = new ValCandy(); candy2.Name = "Valentine's Candy from " + mob.Name; box.DropItem(candy2); ValCandy candy3 = new ValCandy(); candy3.Name = "Valentine's Candy from " + mob.Name; box.DropItem(candy3); ValCandy candy4 = new ValCandy(); candy4.Name = "Valentine's Candy from " + mob.Name; box.DropItem(candy4); int random = Utility.Random(100); if (random < 30) { box.DropItem(new CupidsBow()); } else { box.DropItem(new CupidsHarp()); } switch (GiveGift(mob, box)) { case GiftResult.Backpack: mob.SendMessage(0x482, "Happy Valentines Day from the Staff! Gift items have been placed in your backpack."); break; case GiftResult.BankBox: mob.SendMessage(0x482, "Happy Valentines Day from the Staff! Gift items have been placed in your bank box."); break; } }
public void Delete(GiftBox giftBox) { throw new NotImplementedException(); }
public void Post(GiftBox giftBox) { throw new NotImplementedException(); }
public void TestMethod2() { GiftBox box = new GiftBox(1, 1, 10); Assert.AreEqual(43, box.WrappingNeeded()); }
public void button1_Click(object sender, EventArgs e) { this.gift = CreateNewGift(); Controls.Add(gift); button1.Enabled = false; }
public void TestMethod1R() { GiftBox box = new GiftBox(2, 3, 4); Assert.AreEqual(34, box.FeedRibbonNeeded()); }
// GiftBox() Method - Return a GiftBox public Fly GiftBox() { Fly GiftBox = new GiftBox(_GameWindow); return(GiftBox); }