Cad

Member
Hello,
So I don't know where to start with this... I thought maybe spells.cs under these lines:

C#:
        public virtual bool OnCasterEquiping(Item item)
        {
            if (IsCasting)
            {
                
                if ((item.Layer == Layer.OneHanded || item.Layer == Layer.TwoHanded) && item.AllowEquipedCast(Caster))
                {
                    return true;
                }

                Disturb(DisturbType.EquipRequest);
            }

            return true;
        }

Then again...I'm pretty clueless on this whole scripting thing. Anything will help!

Thanks in advance.
 
Code:
        public virtual bool OnCasterEquiping(Item item)
        {
            if (IsCasting)
            {
                if ((item.Layer == Layer.OneHanded || item.Layer == Layer.TwoHanded) && item.AllowEquipedCast(Caster) || Caster.AccessLevel > AccessLevel.Player)
                {
                    return true;
                }

                Disturb(DisturbType.EquipRequest);
            }

            return true;
        }
 
  • Like
Reactions: Cad
Code compiled with no errors but in-game tested on razor, and classicUO casting as a staff member still un equips items in hand. I'm going to play around with it more when I get off of work but is there anything else in the code line i could change to make this work?

Thanks in advance.
 
***UPDATE***
There's a line in the code that makes changing this weird because I only want staff members to void the clear hands before casting.
Line 56:
C#:
public virtual bool ClearHandsOnCast { get { return true; } }

Not sure if this change could work with that? Any help is greatly appreciated.
 
I looked at this when you posted the original question and so far I haven't found an instance where the clearhands function references the mobile doing the casting. I'd have to dig deeper to find an instance to skip the check if access is > player.
 
  • Like
Reactions: Cad
Code:
        public virtual bool ClearHandsOnCast { get { return Caster.AccessLevel > AccessLevel.Player ? false : true; } }
 
  • Wow
Reactions: Cad

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back