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

◆ GetAnglerReward_Decoration()

void Terraria.Player.GetAnglerReward_Decoration ( List< Item > rewardItems,
IEntitySource source,
int questsDone,
float rarityReduction,
ref GetItemSettings anglerRewardSettings )
inlineprivate

Definition at line 57410 of file Player.cs.

57411 {
57412 float num3 = 1f - rarityReduction;
57413 int num = 100;
57414 float num2 = MathHelper.Lerp(num3, 1f, Math.Min(1f, (float)questsDone / (float)num));
57415 if (num2 >= 1f || Main.rand.NextFloat() <= num2)
57416 {
57417 Item item = new Item();
57418 item.type = 0;
57419 item.SetDefaults(Main.rand.Next(19) switch
57420 {
57421 1 => 2443,
57422 2 => 2444,
57423 3 => 2445,
57424 4 => 2497,
57425 5 => 2495,
57426 6 => 2446,
57427 7 => 2447,
57428 8 => 2448,
57429 9 => 2449,
57430 10 => 2490,
57431 11 => 2496,
57432 12 => 5235,
57433 13 => 5252,
57434 14 => 5256,
57435 15 => 5259,
57436 16 => 5263,
57437 17 => 5264,
57438 18 => 5265,
57439 _ => 2442,
57440 });
57441 rewardItems.Add(item);
57442 }
57443 }

References Terraria.Main.rand, and Terraria.Item.SetDefaults().

Referenced by Terraria.Player.GetAnglerReward().

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