Fixes dictionary uses (#7)
This commit is contained in:
parent
d4a52344f2
commit
916d404c51
161 changed files with 1211 additions and 1722 deletions
|
|
@ -391,10 +391,7 @@ namespace Server.Mobiles
|
|||
if (from == null || !from.Player)
|
||||
return;
|
||||
|
||||
if (m_DamageEntries.ContainsKey(from))
|
||||
m_DamageEntries[from] += amount;
|
||||
else
|
||||
m_DamageEntries.Add(from, amount);
|
||||
m_DamageEntries[from] = amount + (m_DamageEntries.TryGetValue(from, out int value) ? value : 0);
|
||||
|
||||
from.SendMessage($"Total Damage: {m_DamageEntries[from]}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue