Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros
CommonDropNotScalingWithLuck.cs
Go to the documentation of this file.
2
4{
9
11 {
13 if (info.rng.Next(chanceDenominator) < chanceNumerator)
14 {
16 result = default(ItemDropAttemptResult);
17 result.State = ItemDropAttemptResultState.Success;
18 return result;
19 }
20 result = default(ItemDropAttemptResult);
21 result.State = ItemDropAttemptResultState.FailedRandomRoll;
22 return result;
23 }
24}
static void DropItemFromNPC(NPC npc, int itemId, int stack, bool scattered=false)
Definition CommonCode.cs:9
override ItemDropAttemptResult TryDroppingItem(DropAttemptInfo info)
CommonDropNotScalingWithLuck(int itemId, int chanceDenominator, int amountDroppedMinimum, int amountDroppedMaximum)