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

◆ _DropItemFromNPC()

static void Terraria.GameContent.ItemDropRules.CommonCode._DropItemFromNPC ( NPC npc,
int itemId,
int stack,
bool scattered = false )
inlinestaticprivate

Definition at line 17 of file CommonCode.cs.

18 {
19 //IL_000d: Unknown result type (might be due to invalid IL or missing references)
20 if (itemId > 0 && itemId < ItemLoader.ItemCount)
21 {
22 int itemIndex = DropItem(npc.Hitbox, npc.GetItemSource_Loot(), itemId, stack, scattered);
24 }
25 }
static void DropItem(DropAttemptInfo info, int item, int stack, bool scattered=false)
Definition CommonCode.cs:27
static void ModifyItemDropFromNPC(NPC npc, int itemIndex)
This serves as the central class from which item-related functions are carried out....
Definition ItemLoader.cs:26

References Terraria.GameContent.ItemDropRules.CommonCode.DropItem(), Terraria.NPC.GetItemSource_Loot(), Terraria.Entity.Hitbox, Terraria.ModLoader.ItemLoader.ItemCount, and Terraria.GameContent.ItemDropRules.CommonCode.ModifyItemDropFromNPC().

Referenced by Terraria.GameContent.ItemDropRules.CommonCode.DropItem(), Terraria.GameContent.ItemDropRules.CommonCode.DropItemForEachInteractingPlayerOnThePlayer(), Terraria.GameContent.ItemDropRules.CommonCode.DropItemFromNPC(), and Terraria.GameContent.ItemDropRules.CommonCode.DropItemLocalPerClientAndSetNPCMoneyTo0().

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