57635 {
57636
57637
57641 {
57642 3560, 3028, 3041, 3040, 3025, 3190, 3027, 3026, 3554, 3553,
57643 3555, 2872, 3534, 2871
57644 };
57645 if (Main.hardMode)
57646 {
57647 list.Add(3039);
57648 list.Add(3038);
57649 list.Add(3598);
57650 list.Add(3597);
57651 list.Add(3600);
57652 list.Add(3042);
57653 list.Add(3533);
57654 list.Add(3561);
57655 if (
NPC.downedMechBossAny)
57656 {
57657 list.Add(2883);
57658 list.Add(2869);
57659 list.Add(2873);
57660 list.Add(2870);
57661 }
57662 if (
NPC.downedPlantBoss)
57663 {
57664 list.Add(2878);
57665 list.Add(2879);
57666 list.Add(2884);
57667 list.Add(2885);
57668 }
57669 if (
NPC.downedMartians)
57670 {
57671 list.Add(2864);
57672 list.Add(3556);
57673 }
57674 if (
NPC.downedMoonlord)
57675 {
57676 list.Add(3024);
57677 }
57678 }
57680 num = list[Main.rand.Next(list.Count)];
57681 Item item = new Item();
57682 item.SetDefaults(
num);
57683 item.stack = 6;
57684 item.position =
base.Center;
57685 Item
item2 =
GetItem(
whoAmI, item, GetItemSettings.NPCEntityToPlayerInventorySettings);
57686 if (
item2.stack > 0)
57687 {
57689 if (Main.netMode == 1)
57690 {
57691 NetMessage.SendData(21, -1, -1,
null,
number, 1
f);
57692 }
57693 }
57694 }
Used when NPCs or pets/minions give gifts or rewards to a player.
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static void GetDyeTraderReward(Player player, List< int > rewardPool)
This is where all ModPlayer hooks are gathered and called.
Item GetItem(int plr, Item newItem, GetItemSettings settings)