fix: Fixes curses and spell effects (#1112)
* * Fix statmod naming mismatch: everything in code searches for "[Magic] {type} Offset" but stat reductions are being added as "[Magic] {type} Curse"
* Clarifies and cleans up curses
* Fixes blood oath
* * NobleSacrifice remove all curses in one go
* Dont need a method
* Fix extra parentheses
Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
This commit is contained in:
parent
ad0e1702a3
commit
bd4e6fc30e
10 changed files with 126 additions and 126 deletions
|
|
@ -80,12 +80,16 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
public static bool UnderEffect(Mobile m) => _table.ContainsKey(m);
|
||||
|
||||
public static void RemoveEffect(Mobile m)
|
||||
public static bool RemoveEffect(Mobile m)
|
||||
{
|
||||
if (_table.TryGetValue(m, out var context))
|
||||
if (_table.Remove(m, out var context))
|
||||
{
|
||||
context.EndPlague(false);
|
||||
context.Stop();
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.SpellPlague);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void CheckPlague(Mobile m)
|
||||
|
|
@ -179,9 +183,9 @@ namespace Server.Spells.Mysticism
|
|||
}
|
||||
}
|
||||
|
||||
public void EndPlague(bool restart = true)
|
||||
public void EndPlague()
|
||||
{
|
||||
if (restart && m_Next != null)
|
||||
if (m_Next != null)
|
||||
{
|
||||
_table[m_Target] = m_Next;
|
||||
m_Next.StartPlague();
|
||||
|
|
@ -191,6 +195,8 @@ namespace Server.Spells.Mysticism
|
|||
_table.Remove(m_Target);
|
||||
BuffInfo.RemoveBuff(m_Target, BuffIcon.SpellPlague);
|
||||
}
|
||||
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue