Greetings - i wouldn't come here if I hadn't already tried every option i can think of... i'm looking to add a "mark item" context menu entry for playermobiles when they self click. here's what i added to the code (in bold and blue):

public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{

if ( from == this )
{
if ( m_Quest != null )
m_Quest.GetContextMenuEntries( list );
if (Alive)
{
list.Add( new CallbackEntry(1079452, new ContextCallback(delegate
{
from.CloseGump(typeof(StoryItemGump));
from.SendGump(new StoryItemGump(null, this, 0));
}

)));
}
the method of course ends with a reference to the base.GetContextMenuEntries...


I can't figure out for the life of me why the blue doesn't add "Mark item" to the player's context menus (1079452 is cliloc for mark item)
Would anyone have any ideas as to what is preventing this menu from appearing??
 
Just asking the obvious -- when you're testing it, you have an active quest at the time?

I haven't seen a context entry formatted the way you have your example.

I would expect something more like

Code:
list.Add( new CallbackEntry( 1079452, new ContextCallback( MarkItemContext)));

and then another section that actually does the actions

Code:
        private void MarkItemContext()
        {
from.CloseGump(typeof(StoryItemGump));
 from.SendGump(new StoryItemGump(null, this, 0)); 
     }
 
Back