static void SendDropItem(GameObject player, RoR2.ItemIndex itemIndex) { NetworkServer.SendToAll(HandleId, new AddItem { Player = player, ItemIndex = itemIndex }); }
//TODO: use a transpiler instead static void Postfix(RoR2.UI.ItemIcon __instance, RoR2.ItemIndex newItemIndex, int newItemCount) { var itemDef = ItemCatalog.GetItemDef(newItemIndex); if (__instance.tooltipProvider != null && itemDef != null) { var itemDescription = Language.GetString(itemDef.descriptionToken); itemDescription += "\n\n" + ItemStatProvider.ProvideStatsForItem(newItemIndex, newItemCount); __instance.tooltipProvider.overrideBodyText = itemDescription; } }
public override void Deserialize(NetworkReader reader) { Player = reader.ReadGameObject(); ItemIndex = (RoR2.ItemIndex)reader.ReadUInt16(); }