Hey, so i'm trying to setup a UOR era based server and after setting the expansion to UOR in the config files, I was still getting context menus on everything. After a bit of digging, I was able to turn them off by editing ExpansionInfo.cs in the server core. However, when i click a mobile or item I get nothing now. No name hovering above as well as the names of approaching mobiles do not show. Any ideas on how to fix this? I've never had this issue before on RunUO.

Below is the ExpansionInfo.cs edit I made. Other than changing the expansion and this edit. No other changes have been made.

Before:
public enum CharacterListFlags
{
None = 0x00000000,
Unk1 = 0x00000001,
OverwriteConfigButton = 0x00000002,
OneCharacterSlot = 0x00000004,
ContextMenus = 0x00000008,
SlotLimit = 0x00000010,
AOS = 0x00000020,
SixthCharacterSlot = 0x00000040,
SE = 0x00000080,
ML = 0x00000100,
Unk2 = 0x00000200,
UO3DClientType = 0x00000400,
KR = 0x00000600, // uo:kr support flags
Unk3 = 0x00000800,
SeventhCharacterSlot = 0x00001000,
Unk4 = 0x00002000,
NewMovementSystem = 0x00004000,
NewFeluccaAreas = 0x00008000,
ExpansionNone = ContextMenus, //
ExpansionT2A = ContextMenus, //
ExpansionUOR = ContextMenus, // None
ExpansionUOTD = ContextMenus, //
ExpansionLBR = ContextMenus, //
ExpansionAOS = ContextMenus | AOS,
ExpansionSE = ExpansionAOS | SE,
ExpansionML = ExpansionSE | ML,
ExpansionSA = ExpansionML,
ExpansionHS = ExpansionSA,
ExpansionTOL = ExpansionHS,
ExpansionEJ = ExpansionTOL
}

After:
public enum CharacterListFlags
{
None = 0x00000000,
Unk1 = 0x00000001,
OverwriteConfigButton = 0x00000002,
OneCharacterSlot = 0x00000004,
ContextMenus = 0x00000008,
SlotLimit = 0x00000010,
AOS = 0x00000020,
SixthCharacterSlot = 0x00000040,
SE = 0x00000080,
ML = 0x00000100,
Unk2 = 0x00000200,
UO3DClientType = 0x00000400,
KR = 0x00000600, // uo:kr support flags
Unk3 = 0x00000800,
SeventhCharacterSlot = 0x00001000,
Unk4 = 0x00002000,
NewMovementSystem = 0x00004000,
NewFeluccaAreas = 0x00008000,
ExpansionNone = None, //
ExpansionT2A = None, //
ExpansionUOR = None, // None
ExpansionUOTD = None, //
ExpansionLBR = None, //
ExpansionAOS = ContextMenus | AOS,
ExpansionSE = ExpansionAOS | SE,
ExpansionML = ExpansionSE | ML,
ExpansionSA = ExpansionML,
ExpansionHS = ExpansionSA,
ExpansionTOL = ExpansionHS,
ExpansionEJ = ExpansionTOL
}

Any help is greatly appreciated!

EDIT: Verified that everything works as it should with the current version of RunUO 2.7.0.38220 and is not working on the current version of ServUO Version 0.5, Build 6932.37876.

I used client version: 7.0.74.28 for testing both.
 
Last edited:
Have you looked at how the context menus are handled in mobile, basecreature, and item?

I wager that's a safer place to start editing.

Edit: dang phone posting
 
Last edited:
I mean you should be fine without all these edits, all you need is to edit the config file to use UOR as expansion?
 
Ok found the issue, this is more or less just a bandaid fix for now so
@Voxpire or @Dexter_Lexia will need to take a look at this, since I am not sure why there was a change
in that packethandling in the first place.

ServUO-master\Server\Network\PacketHandlers.cs
Line: 1723
change
Code:
        public static void LookReq(NetState state, PacketReader pvSrc)
        {
            if (state.Mobile != null && (state.Mobile.ViewOPL || state.Expansion < Expansion.AOS))
            {
                HandleSingleClick(state.Mobile, World.FindEntity(pvSrc.ReadInt32()));
            }
        }
to
Code:
        public static void LookReq(NetState state, PacketReader pvSrc)
        {
            if (state.Mobile != null/* && (state.Mobile.ViewOPL || state.Expansion < Expansion.AOS)*/)
            {
                HandleSingleClick(state.Mobile, World.FindEntity(pvSrc.ReadInt32()));
            }
        }

And additionally
Line 2219:
Code:
        public static void ContextMenuRequest(NetState state, PacketReader pvSrc)
        {
            var target = World.FindEntity(pvSrc.ReadInt32());

            if (target != null && ObjectPropertyList.Enabled && !state.Mobile.ViewOPL)
            {
                HandleSingleClick(state.Mobile, target);
            }

            ContextMenu.Display(state.Mobile, target);
        }
to
Code:
        public static void ContextMenuRequest(NetState state, PacketReader pvSrc)
        {
            var target = World.FindEntity(pvSrc.ReadInt32());

            if (target != null && ObjectPropertyList.Enabled && state.Mobile.ViewOPL)
            {
                HandleSingleClick(state.Mobile, target);
                ContextMenu.Display(state.Mobile, target);
            }
        }
 
Thank you Pyro, I actually managed to make my own edits to packethandlers.cs and was able to get it working. But I will use your edits instead as they are much simpler! Thank you!


For anyone else having this problem, I can confirm that Pyro's edits work 100% as intended.
 
Last edited:
The edits were done the way they were to support both context menus and single clicks, while turning off hover tool-tips on a per-player basis.

Likely the fixes in this thread will break the original intended functionality, but since it's not used... doesn't matter.
 
I made the fix to this, but it wasn't quite like the example above. The only thing I did:

Code:
public static void ContextMenuRequest(NetState state, PacketReader pvSrc)
		{
			var target = World.FindEntity(pvSrc.ReadInt32());
            if (target != null && ObjectPropertyList.Enabled)
            {
                if (!state.Mobile.ViewOPL)
                {
                    HandleSingleClick(state.Mobile, target);
                }
                else
                {
                    ContextMenu.Display(state.Mobile, target);
                }
            }
		}
 
All ObjectPropertyList.Enabled calls were replaced with Mobile.ViewOPL calls, which returns ObjectPropertyList.Enabled by default.

Therefore;
Code:
if(target !=null && ObjectPropertyList.Enabled)

When true, means that;
Code:
if(!state.Mobile.ViewOPL)

Is always evaluating to false, meaning;
Code:
ContextMenu.Display(state.Mobile, target);

Is always called, therefore making the entire check redundant and the feature support non functional.
 
This edit was to disable contex menus on pre-AOS servers. The problem is, ContextMenu feature is present in ALL expansions for some reason, and has been that way since RunUO. I don’t know if removing it from Pre AOS expansions will break anything in the client. That’s why OPLEnable was used, I’m sure.
 
Back