Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Source/ACE.Server/Entity/Spell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint> TryBurnComponents(Player player)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/Creature_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Source/ACE.Server/WorldObjects/Player_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/WorldObject_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down