diff --git a/Source/ACE.Server/Entity/Spell.cs b/Source/ACE.Server/Entity/Spell.cs index c58c45e00b..b7e227feda 100644 --- a/Source/ACE.Server/Entity/Spell.cs +++ b/Source/ACE.Server/Entity/Spell.cs @@ -131,7 +131,28 @@ public uint Level public bool IsTracking => !Flags.HasFlag(SpellFlags.NonTrackingProjectile); - public bool IsFellowshipSpell => Flags.HasFlag(SpellFlags.FellowshipSpell); + public bool IsFellowshipSpell + { + get + { + // some spells are missing SpellFlags.FellowshipSpell: + // 3043 - Kiss of the Grave + // 3320 - Lesser Corrosive Ward + // 3375 - Fungal Bloom + // 3470 - Lesser Endless Well + // 3474 - Lesser Soothing Wind + // 3478 - Lesser Golden Wind + + // some spells have SpellFlags.FellowshipSpell, but aren't an actual Fellow* MetaSpellType: + // 3337 - Inferno Ward (Enchantment) + // 3381 - Debilitating Spore (Boost) + // 3382 - Diseased Air (Boost) + // 3406 - Kivik Lir's Boon (Enchantment) + + return Flags.HasFlag(SpellFlags.FellowshipSpell) || + MetaSpellType >= SpellType.FellowBoost && MetaSpellType <= SpellType.FellowDispel; + } + } public List TryBurnComponents(Player player) { diff --git a/Source/ACE.Server/WorldObjects/Creature_Magic.cs b/Source/ACE.Server/WorldObjects/Creature_Magic.cs index 5193e9eba0..524ab13e97 100644 --- a/Source/ACE.Server/WorldObjects/Creature_Magic.cs +++ b/Source/ACE.Server/WorldObjects/Creature_Magic.cs @@ -29,7 +29,7 @@ public uint CalculateManaUsage(Creature caster, Spell spell, WorldObject target baseCost += spell.ManaMod * (uint)numTargetItems; } - else if ((spell.Flags & SpellFlags.FellowshipSpell) != 0) + else if (spell.IsFellowshipSpell) { var numFellows = 1; if (this is Player player && player.Fellowship != null) diff --git a/Source/ACE.Server/WorldObjects/Player_Magic.cs b/Source/ACE.Server/WorldObjects/Player_Magic.cs index b394604ac4..adb50b0cba 100644 --- a/Source/ACE.Server/WorldObjects/Player_Magic.cs +++ b/Source/ACE.Server/WorldObjects/Player_Magic.cs @@ -222,7 +222,7 @@ public TargetCategory GetTargetCategory(uint targetGuid, uint spellId, out World { // fellowship spell var spell = new Spell(spellId); - if ((spell.Flags & SpellFlags.FellowshipSpell) != 0) + if (spell.IsFellowshipSpell) { target = this; return TargetCategory.Fellowship; @@ -892,7 +892,7 @@ public void DoCastSpell_Inner(Spell spell, WorldObject casterItem, uint manaUsed { case CastingPreCheckStatus.Success: - if ((spell.Flags & SpellFlags.FellowshipSpell) == 0) + if (!spell.IsFellowshipSpell) CreatePlayerSpell(target, spell, isWeaponSpell); else { diff --git a/Source/ACE.Server/WorldObjects/WorldObject_Magic.cs b/Source/ACE.Server/WorldObjects/WorldObject_Magic.cs index 8914a9f712..800df98237 100644 --- a/Source/ACE.Server/WorldObjects/WorldObject_Magic.cs +++ b/Source/ACE.Server/WorldObjects/WorldObject_Magic.cs @@ -45,7 +45,7 @@ public void TryCastSpell(Spell spell, WorldObject target, WorldObject itemCaster return; } - if (spell.Flags.HasFlag(SpellFlags.FellowshipSpell)) + if (spell.IsFellowshipSpell) { if (target is not Player targetPlayer || targetPlayer.Fellowship == null) return;