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

◆ TryFreeingElderSlime()

static bool Terraria.Main.TryFreeingElderSlime ( int npcIndex)
inlinestaticprivate

Definition at line 55687 of file Main.cs.

55688 {
55689 Player player = Main.player[myPlayer];
55690 short type = 327;
55691 bool inVoidBag = false;
55692 int num = player.FindItemInInventoryOrOpenVoidBag(type, out inVoidBag);
55693 if (num == -1)
55694 {
55695 return false;
55696 }
55697 Item item = null;
55698 item = ((!inVoidBag) ? player.inventory[num] : player.bank4.item[num]);
55699 if (--item.stack <= 0)
55700 {
55701 item.TurnToAir();
55702 }
55703 Recipe.FindRecipes();
55704 return true;
55705 }
static Item[] item
Definition Main.cs:1826
static int myPlayer
The index in F:Terraria.Main.player of this client's Player. If this is 255, this client is the ser...
Definition Main.cs:1958
static Player[] player
Definition Main.cs:1960

References Terraria.Recipe.FindRecipes(), Terraria.Main.item, Terraria.Main.myPlayer, and Terraria.Main.player.

Referenced by Terraria.Main.HoverOverNPCs().

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