- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
Getting the following:
related to:
Not quite sure what that means, if you need to see the full scripts let me know, essentially what I am trying to do is add in an item that can be used indefinitely and doesn't expire to be used in place of the arcane focus, but not replace it.
C#:
Operator '||' cannot be applied to operands of type 'ArcaneFocus' and 'EverlastingArcaneFocus'
C#:
public static int GetFocusLevel(Mobile from)
{
// Iomega0318 - EverlastingArcaneFocus
ArcaneFocus focus = (FindArcaneFocus(from) || FindEverlastingArcaneFocus(from));
if (focus == null || focus.Deleted)
{
if (Core.TOL && from is BaseCreature && from.Skills[SkillName.Spellweaving].Value > 0)
{
return (int)Math.Max(1, Math.Min(6, from.Skills[SkillName.Spellweaving].Value / 20));
}
return Math.Max(GetMasteryFocusLevel(from), 0);
}
return Math.Max(GetMasteryFocusLevel(from), focus.StrengthBonus);
}
public static int GetMasteryFocusLevel(Mobile from)
{
if (!Core.TOL)
{
return 0;
}
if (from.Skills.CurrentMastery == SkillName.Spellweaving)
{
return Math.Max(1, MasteryInfo.GetMasteryLevel(from, SkillName.Spellweaving));
}
return 0;
}
public static ArcaneFocus FindArcaneFocus(Mobile from)
{
if (from == null || from.Backpack == null)
{
return null;
}
if (from.Holding is ArcaneFocus)
{
return (ArcaneFocus)from.Holding;
}
return from.Backpack.FindItemByType<ArcaneFocus>();
}
// Iomega0318 - EverlastingArcaneFocus
public static EverlastingArcaneFocus FindEverlastingArcaneFocus(Mobile from)
{
if (from == null || from.Backpack == null)
{
return null;
}
if (from.Holding is EverlastingArcaneFocus)
{
return (EverlastingArcaneFocus)from.Holding;
}
return from.Backpack.FindItemByType<EverlastingArcaneFocus>();
}
Not quite sure what that means, if you need to see the full scripts let me know, essentially what I am trying to do is add in an item that can be used indefinitely and doesn't expire to be used in place of the arcane focus, but not replace it.