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;
|
||||
|
||||
namespace Server.Spells.Chivalry;
|
||||
|
||||
|
|
@ -52,24 +54,19 @@ public class DivineFurySpell : PaladinSpell
|
|||
|
||||
if (Core.HS) // Publish 71 with boost
|
||||
{
|
||||
BuffInfo.AddBuff(
|
||||
Caster,
|
||||
(Caster as PlayerMobile)?.AddBuff(
|
||||
new BuffInfo(
|
||||
BuffIcon.DivineFury,
|
||||
1060589,
|
||||
1150218,
|
||||
delay,
|
||||
Caster,
|
||||
$"{timer.AttackBonus}\t{timer.DamageBonus}\t{timer.WeaponSpeed}\t{timer.DefendMalus}"
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
BuffInfo.AddBuff(
|
||||
Caster,
|
||||
new BuffInfo(BuffIcon.DivineFury, 1060589, 1075634, delay, Caster)
|
||||
);
|
||||
(Caster as PlayerMobile)?.AddBuff(new BuffInfo(BuffIcon.DivineFury, 1060589, 1075634, delay));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +113,7 @@ public class DivineFurySpell : PaladinSpell
|
|||
RemoveTimer(m);
|
||||
m.Delta(MobileDelta.WeaponDamage);
|
||||
m.PlaySound(0xF8);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.DivineFury);
|
||||
(m as PlayerMobile)?.RemoveBuff(BuffIcon.DivineFury);
|
||||
}
|
||||
|
||||
public static bool UnderEffect(Mobile m) => _table.ContainsKey(m);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.BuffIcons;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Spells.Chivalry
|
||||
|
|
@ -49,9 +50,8 @@ namespace Server.Spells.Chivalry
|
|||
mobile.EnemyOfOneType = null;
|
||||
mobile.WaitingForEnemy = true;
|
||||
|
||||
BuffInfo.AddBuff(
|
||||
mobile,
|
||||
new BuffInfo(BuffIcon.EnemyOfOne, 1075653, 1044111, TimeSpan.FromMinutes(delay), mobile)
|
||||
mobile.AddBuff(
|
||||
new BuffInfo(BuffIcon.EnemyOfOne, 1075653, 1044111, TimeSpan.FromMinutes(delay))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server.Collections;
|
||||
using Server.Engines.BuffIcons;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -142,14 +143,17 @@ namespace Server.Spells.Chivalry
|
|||
sendEffect = SpellPlagueSpell.RemoveEffect(m) || sendEffect;
|
||||
|
||||
// TODO: Move these into their respective end effect methods
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Clumsy);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Weaken);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Curse);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.MassCurse);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Strangle);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen);
|
||||
if (m is PlayerMobile pm)
|
||||
{
|
||||
pm.RemoveBuff(BuffIcon.Clumsy);
|
||||
pm.RemoveBuff(BuffIcon.FeebleMind);
|
||||
pm.RemoveBuff(BuffIcon.Weaken);
|
||||
pm.RemoveBuff(BuffIcon.Curse);
|
||||
pm.RemoveBuff(BuffIcon.MassCurse);
|
||||
pm.RemoveBuff(BuffIcon.MortalStrike);
|
||||
pm.RemoveBuff(BuffIcon.Strangle);
|
||||
pm.RemoveBuff(BuffIcon.EvilOmen);
|
||||
}
|
||||
|
||||
if (sendEffect)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using Server.Engines.BuffIcons;
|
||||
using Server.Engines.ConPVP;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Spells.Mysticism;
|
||||
using Server.Spells.Necromancy;
|
||||
|
|
@ -109,15 +111,17 @@ namespace Server.Spells.Chivalry
|
|||
BloodOathSpell.RemoveCurse(m);
|
||||
SpellPlagueSpell.RemoveEffect(m);
|
||||
|
||||
// TODO: Move these into their respective end effect methods
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Clumsy);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.FeebleMind);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Weaken);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Curse);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.MassCurse);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.MortalStrike);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.Strangle);
|
||||
BuffInfo.RemoveBuff(m, BuffIcon.EvilOmen);
|
||||
if (m is PlayerMobile pm)
|
||||
{
|
||||
pm.RemoveBuff(BuffIcon.Clumsy);
|
||||
pm.RemoveBuff(BuffIcon.FeebleMind);
|
||||
pm.RemoveBuff(BuffIcon.Weaken);
|
||||
pm.RemoveBuff(BuffIcon.Curse);
|
||||
pm.RemoveBuff(BuffIcon.MassCurse);
|
||||
pm.RemoveBuff(BuffIcon.MortalStrike);
|
||||
pm.RemoveBuff(BuffIcon.Strangle);
|
||||
pm.RemoveBuff(BuffIcon.EvilOmen);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue