This reverts commit 179cb50557.
This commit is contained in:
parent
179cb50557
commit
c2ecc76457
588 changed files with 16260 additions and 10926 deletions
|
|
@ -950,24 +950,24 @@ namespace Server.Engines.CannedEvil
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1001,10 +1001,10 @@ namespace Server.Engines.CannedEvil
|
|||
|
||||
writer.Write(m_SPawnSzMod);
|
||||
writer.Write(m_DamageEntries.Count);
|
||||
foreach (var (key, value) in m_DamageEntries)
|
||||
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
|
||||
{
|
||||
writer.Write(key);
|
||||
writer.Write(value);
|
||||
writer.Write(kvp.Key);
|
||||
writer.Write(kvp.Value);
|
||||
}
|
||||
|
||||
writer.Write(ConfinedRoaming);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue