cMakeMenu* pMakeMenu = cAllMakeMenus::getInstance()->getMenu( "ADD_MENU" ); if( !pMakeMenu ) socket->sysMessage( "Addmenu undefined!" ); else socket->send( new cMakeMenuGump( pMakeMenu, socket ) );
cAllMakeMenus::getInstance()->callMakeMenu( socket, "ADD_MENU" );
void commandAdd( cUOSocket *socket, const QString &command, QStringList &args ){	// Bring up the Add-menu	if( args.count() < 1 )	{		cMakeMenu* pMakeMenu = cAllMakeMenus::getInstance()->getMenu( "ADD_MENU" );		if( !pMakeMenu )			socket->sysMessage( "Addmenu undefined!" );		else			socket->send( new cMakeMenuGump( pMakeMenu, socket ) );		return;	}	QString param = args.join( " " ).stripWhiteSpace();    	QDomElement *node = DefManager->getSection( WPDT_ITEM, param );	// An item definition with that name exists	if( node && !node->isNull() )	{		socket->sysMessage( tr( "Where do you want to add the item '%1'" ).arg( param ) );		socket->attachTarget( new cAddItemTarget( param ) );		return;	}	node = DefManager->getSection( WPDT_NPC, param );		// Same for NPCs	if( node && !node->isNull() )	{		socket->sysMessage( tr( "Where do you want to add the npc '%1'" ).arg( param ) );		socket->attachTarget( new cAddNpcTarget( param ) );		return;	}		socket->sysMessage( tr( "Item or NPC Definition '%1' not found" ).arg( param ) );	return;}