public override void OpenVanillaBag(string context, Player player, int arg) { if (context != "goodieBag") { return; } ItemUtils.DropCandy(player); if (Main.rand.Next(3) == 0) { int[] lootTable = { ModContent.ItemType <MaskSchmo>(), ModContent.ItemType <MaskGraydee>(), ModContent.ItemType <MaskLordCake>(), ModContent.ItemType <MaskVladimier>(), ModContent.ItemType <MaskKachow>(), ModContent.ItemType <MaskBlaze>(), ModContent.ItemType <MaskSvante>(), ModContent.ItemType <MaskIggy>(), ModContent.ItemType <MaskYuyutsu>(), ModContent.ItemType <MaskLeemyy>() }; int loot = Main.rand.Next(lootTable.Length); player.QuickSpawnItem(lootTable[loot]); } }
public override void OpenVanillaBag(string context, Player player, int arg) { if (context != "goodieBag") { return; } ItemUtils.DropCandy(player); if (Main.rand.Next(3) == 0) { string[] lootTable = { "MaskSchmo", "MaskGraydee", "MaskLordCake", "MaskVladimier", "MaskKachow", "MaskHulk", "MaskBlaze", "MaskSvante", "MaskIggy", "MaskYuyutsu", "MaskLeemyy", }; int loot = Main.rand.Next(lootTable.Length); player.QuickSpawnItem(mod.ItemType(lootTable[loot])); } }
public override void RightClick(int i, int j) { if (Main.dayTime) { return; } Player player = Main.player[Main.myPlayer]; MyPlayer modPlayer = player.GetModPlayer <MyPlayer>(); if (modPlayer.candyInBowl <= 0) { return; } ItemUtils.DropCandy(player); modPlayer.candyInBowl--; }