public static void UpdateArmorSet(Item item, Player player) { if (PreUpdateArmorSet == null || !PreUpdateArmorSet.Invoke(player, item)) { if (player.whoAmI != Main.myPlayer || !DefaultTranslation.TranslateSetBonus(item)) { item.modItem.UpdateArmorSet(player); } } if (PostUpdateArmorSet != null) { PostUpdateArmorSet.Invoke(player, item); } }
public static void SetChatButton(ModNPC npc, ref string button1, ref string button2) { if (PreSetChatButton == null || !PreSetChatButton.Invoke(npc, ref button1, ref button2)) { if (!DefaultTranslation.TranslateChatButton(npc, ref button1, ref button2)) { npc.SetChatButtons(ref button1, ref button2); } } if (PostSetChatButton != null) { PostSetChatButton.Invoke(npc, ref button1, ref button2); } }