public override bool UseItem(Player player) { Item item = player.inventory[0]; if (item.type > 0 && (item.magic || item.melee || item.summon || item.ranged)) { UpgradeInfo info = item.GetGlobalItem <UpgradeInfo>(mod); int socketNumber = info.getNumberOfSocket(); if (socketNumber > 0) { if (!info.socketAvailable()) { return(false); } info.AddIntoSocket("+5% Life Steal", new Color(255, 0, 0), info); return(true); } return(false); } return(false); }