public Boolean DoAddCard() { if (Session[Keys.SESSION_ADMIN_INFO] == null) { return(false); } else { Master master = Session[Keys.SESSION_ADMIN_INFO] as Master; if (rcm.GetRoleCompetence(master.RoleId, 11252)) { cardsname cn = new cardsname(); cn.gameid = int.Parse(Request["GameId"]); cn.serverid = int.Parse(Request["ServerId"]); cn.cardname = Request["CardName"]; cn.urls = Request["Url"]; cn.islock = Request["IsLock"] == "on" ? 1 : 0; cn.img = Request["Img"]; cn.carddesc = Request["CardDesc"]; return(cm.AddCard(cn)); } else { return(false); } } }
public void AddDiscoverCard(IMonster mon, int cardId, int level, DiscoverCardActionType type) { switch (type) { case DiscoverCardActionType.AddCard: CardManager.AddCard(cardId, level, 0); break; case DiscoverCardActionType.Add2Cards: CardManager.AddCard(cardId, level, 0); CardManager.AddCard(cardId, level, 0); break; } AddCardReason(mon, Frag.AddCardReason.Discover); }
public void AddRandomCardJob(IMonster mon, int job, int lv) { var cardId = CardConfigManager.GetRandomJobCard(job); if (cardId != 0) { CardManager.AddCard(cardId, lv, 0); AddCardReason(mon, Frag.AddCardReason.RandomCard); } }
public void AddRandomCardRace(IMonster mon, int race, int lv) { var cardId = CardConfigManager.GetRandomRaceCard(race); if (cardId != 0) { CardManager.AddCard(cardId, lv, 0); AddCardReason(mon, Frag.AddCardReason.RandomCard); } }
public void AddRandomCard(IMonster mon, int type, int lv) { int cardId = CardConfigManager.GetRandomTypeCard(type); if (cardId != 0) { CardManager.AddCard(cardId, lv, 0); AddCardReason(mon, Frag.AddCardReason.RandomCard); } }
public override void Run() { Console.WriteLine("Searching for cards...\n"); bool gotGuaranteedSR = false; for (int i = 0; i < 10; ++i) { var rand = new Random(); var lottery = rand.Next(100); RarityType rarity = RarityType.R; if (lottery < SSRChance) { rarity = RarityType.SSR; } else if (lottery < SRChance) { rarity = RarityType.SR; } if (i == 9 && rarity == RarityType.R && !gotGuaranteedSR) { rarity = RarityType.SR; } while (true) { var cardData = CardManager.AllCards().ToArray()[rand.Next(CardManager.AllCards().Count)]; if (cardData.Rarity == rarity) { bool isDupe = CardManager.Cards().Any(item => item.cardId == cardData.GetID()); string dupeText = isDupe ? " " : rarityNewString[rarity]; var cardText = $" {dupeText}{cardData.Name.str} ({cardData.Attribute})"; foreach (var c in cardText) { Console.Write(c); Thread.Sleep(2); } Console.Write("\n"); CardManager.AddCard(cardData); if (cardData.Rarity != RarityType.R) { gotGuaranteedSR = true; } Thread.Sleep(50); break; } } } }
public override void InitialCards() { base.InitialCards(); #if DEBUG int[] cardToGive = new[] { 52000045, 52000127 }; foreach (var cardId in cardToGive) { CardManager.AddCard(new ActiveCard(cardId, 1, 0)); } #endif }
public async Task <IActionResult> GetOrderStatusNewCard([FromQuery] string orderId) { int id = Int32.Parse(User.Claims.First(c => c.Type == "UserId").Value); try { OrderStatusModel orderStatus = await PaymentManager.GetOrderStatus(orderId); Uri domain = new Uri(Request.GetDisplayUrl()); Uri uri = new Uri(domain.Scheme + "://" + domain.Host + (domain.IsDefaultPort ? "" : ":" + domain.Port)); host = uri.ToString(); orderStatus.Date = DateTime.Now.ToString(); CardManager.AddCard(orderStatus.BindingInfo.BindingId); return(Ok()); } catch { return(BadRequest()); } }
public override void Run() { Console.WriteLine("Searching for cards...\n"); Console.WriteLine("Do you really want all the cards? [yes/no]: "); var response = Console.ReadLine(); if (response == "yes") { Console.WriteLine(""); foreach (var cardData in CardManager.AllCards()) { bool isDupe = CardManager.Cards().Any(item => item.cardId == cardData.GetID()); string dupeText = isDupe ? " " : rarityNewString[cardData.Rarity]; var cardText = $" {dupeText}{cardData.Name.str} ({cardData.Attribute})"; Console.WriteLine(cardText); CardManager.AddCard(cardData); Thread.Sleep(10); } } }
public void AddCard(IMonster mon, int cardId, int level, int modify) { CardManager.AddCard(cardId, level, modify); AddCardReason(mon, Frag.AddCardReason.GetCertainCard); }