chore(content): Cleans up abilities and some spell timers (#427)
- [X] Exposes Index/Count on the timer. - [X] Cleans up abilities - [X] Combines some spell context/info objects with their timers to reduce allocations - [X] Fixes a bug where immolating weapon both finishes effect or stops in the wrong order due to a race condition.
This commit is contained in:
parent
9ef7752beb
commit
178f71c6dc
33 changed files with 469 additions and 677 deletions
|
|
@ -73,14 +73,13 @@ namespace Server.Spells.Necromancy
|
|||
|
||||
public static void ClearMindRotScalar(Mobile m)
|
||||
{
|
||||
if (!m_Table.Remove(m, out var tmpB))
|
||||
if (m_Table.Remove(m, out var tmpB))
|
||||
{
|
||||
return;
|
||||
tmpB.m_MRExpireTimer.Stop();
|
||||
m.SendLocalizedMessage(1060872); // Your mind feels normal again.
|
||||
}
|
||||
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);
|
||||
tmpB.m_MRExpireTimer.Stop();
|
||||
m.SendLocalizedMessage(1060872); // Your mind feels normal again.
|
||||
}
|
||||
|
||||
public static bool HasMindRotScalar(Mobile m) => m_Table.ContainsKey(m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue