fix: Fixes undead slayer chance (#1135)
This commit is contained in:
parent
c4b814cc07
commit
41cc7e60d9
1 changed files with 5 additions and 22 deletions
|
|
@ -529,29 +529,12 @@ namespace Server.Items
|
|||
return SlayerName.None;
|
||||
}
|
||||
|
||||
var
|
||||
group = groups[
|
||||
Utility.Random(
|
||||
groups.Length -
|
||||
1
|
||||
)]; // -1 To Exclude the Fey Slayer which appears ONLY on a certain artifact.
|
||||
SlayerEntry entry;
|
||||
// -1 To Exclude the Fey Slayer which appears ONLY on a certain artifact.
|
||||
var group = groups[Utility.Random(groups.Length - 1)];
|
||||
|
||||
if (Utility.Random(100) < 10) // 10% chance to do super slayer
|
||||
{
|
||||
entry = group.Super;
|
||||
}
|
||||
else
|
||||
{
|
||||
var entries = group.Entries;
|
||||
|
||||
if (entries.Length == 0)
|
||||
{
|
||||
return SlayerName.None;
|
||||
}
|
||||
|
||||
entry = entries.RandomElement();
|
||||
}
|
||||
// 10% chance for a super slayer
|
||||
var entry = group.Entries.Length == 0 || Utility.Random(10) == 0
|
||||
? group.Super : group.Entries.RandomElement();
|
||||
|
||||
return entry.Name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue