fix: Fixes buffs don't start/stop properly. Streamlines constructor and Add/Remove buffs. (#2082)
This commit is contained in:
parent
c8f13b2933
commit
d5160bd6db
50 changed files with 651 additions and 616 deletions
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BuffIcons;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Necromancy;
|
||||
|
|
@ -72,7 +74,7 @@ public class MindRotSpell : NecromancerSpell, ITargetingSpell<Mobile>
|
|||
{
|
||||
timer.Stop();
|
||||
m.SendLocalizedMessage(1060872); // Your mind feels normal again.
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Mindrot);
|
||||
(m as PlayerMobile)?.RemoveBuff(BuffIcon.Mindrot);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -101,7 +103,7 @@ public class MindRotSpell : NecromancerSpell, ITargetingSpell<Mobile>
|
|||
timer.Start();
|
||||
_table[target] = timer;
|
||||
|
||||
BuffInfo.AddBuff(target, new BuffInfo(BuffIcon.Mindrot, 1075665, duration, target));
|
||||
(target as PlayerMobile)?.AddBuff(new BuffInfo(BuffIcon.Mindrot, 1075665, duration));
|
||||
target.SendLocalizedMessage(1074384);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue