Revert "Updates Packets & Randomizer (#43)" (#61)

This reverts commit 179cb50557.
This commit is contained in:
Kamron Batman 2019-11-11 08:46:11 -08:00 • committed by GitHub
parent 179cb50557
commit c2ecc76457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
588 changed files with 16260 additions and 10926 deletions

View file

@ -398,24 +398,24 @@ namespace Server.Mobiles
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
foreach (var (key, value) in m_DamageEntries)
if (IsEligible(key, artifact))
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
if (IsEligible(kvp.Key, artifact))
{
validEntries.Add(key, value);
totalDamage += value;
validEntries.Add(kvp.Key, kvp.Value);
totalDamage += kvp.Value;
}
int randomDamage = Utility.RandomMinMax(1, totalDamage);
totalDamage = 0;
foreach (var (key, value) in validEntries)
foreach (KeyValuePair<Mobile, int> kvp in validEntries)
{
totalDamage += value;
totalDamage += kvp.Value;
if (totalDamage >= randomDamage)
{
GiveArtifact(key, artifact);
GiveArtifact(kvp.Key, artifact);
return;
}
}