Exemplo n.º 1
0
        public override void UpdateInventory(Item item, Player player)
        {
            AffixItemPlayer pomPlayer = player.GetModPlayer <AffixItemPlayer>();

            foreach (var prefix in prefixes)
            {
                prefix.UpdateInventory(item, pomPlayer);
            }
            foreach (var suffix in suffixes)
            {
                suffix.UpdateInventory(item, pomPlayer);
            }
        }
Exemplo n.º 2
0
 public override void NPCLoot(NPC npc)
 {
     for (int i = 0; i < Main.maxPlayers; i++)
     {
         Player player = Main.player[i];
         if (player.active && !player.dead)
         {
             AffixItemPlayer affixPlayer = player.GetModPlayer <AffixItemPlayer>();
             int             droppedGold = affixPlayer.goldDropChances.Roll();
             if (droppedGold > 0)
             {
                 Item.NewItem(npc.position, npc.width, npc.height, ItemID.GoldCoin, droppedGold);
             }
         }
     }
 }