//////////////// public override void OnConsumeItem(Player player) { DillutedEctoplasmItem.ApplyEctoplasmDose(player); int itemWho = Item.NewItem(player.position, ModContent.ItemType <EmptyCanopicJarItem>(), 1, false, 0, true); if (Main.netMode == NetmodeID.MultiplayerClient) { NetMessage.SendData(MessageID.SyncItem, -1, -1, null, itemWho, 1f, 0f, 0f, 0, 0, 0); } }
public override bool OnPickup(Player player) { string timerName = "NecrotisPickupRepeatStopper_" + player.whoAmI + "_" + this.item.whoAmI; bool hasCooldown = Timers.GetTimerTickDuration(timerName) > 0; Timers.SetTimer(timerName, 15, false, () => false); if (!hasCooldown) { // If picked up into jar, don't apply dose if (!this.PickupIntoJarIf(player, out bool isError) && !isError) { DillutedEctoplasmItem.ApplyEctoplasmDose(player); } } return(false); }