TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ EquipSwap()

static Item Terraria.UI.ItemSlot.EquipSwap ( Item item,
Item[] inv,
int slot,
out bool success )
inlinestaticprivate

Definition at line 3157 of file ItemSlot.cs.

3158 {
3159 success = false;
3160 _ = Main.player[Main.myPlayer];
3161 item.favorited = false;
3162 Item result = inv[slot].Clone();
3163 inv[slot] = item.Clone();
3165 Recipe.FindRecipes();
3166 success = true;
3167 return result;
3168 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...

References Terraria.Item.Clone(), Terraria.Recipe.FindRecipes(), Terraria.Main.myPlayer, Terraria.Main.player, and Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.UI.ItemSlot.SwapEquip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: