示例#1
0
bool CClient::addGumpDialogProps( CGrayUID uid )
{
	ADDTOCALLSTACK("CClient::addGumpDialogProps");
	// put up a prop dialog for the object.
	CObjBase * pObj = uid.ObjFind();
	if ( pObj == NULL )
		return false;
	if ( m_pChar == NULL )
		return( false );
	if ( ! m_pChar->CanTouch( pObj ))	// probably a security issue.
		return( false );

	m_Prop_UID = m_Targ_UID = uid;
	if ( uid.IsChar() )
		addSkillWindow(static_cast<SKILL_TYPE>(g_Cfg.m_iMaxSkill), true);

	TCHAR *pszMsg = Str_GetTemp();
	strcpy(pszMsg, pObj->IsItem() ? "d_ITEMPROP1" : "d_CHARPROP1" );

	RESOURCE_ID rid = g_Cfg.ResourceGetIDType(RES_DIALOG, pszMsg);
	if ( ! rid.IsValidUID())
		return false;

	Dialog_Setup( CLIMODE_DIALOG, rid, 0, pObj );
	return( true );
}
示例#2
0
bool CClient::addGumpDialogProps(CObjBase *pObj)
{
	ADDTOCALLSTACK("CClient::addGumpDialogProps");
	// Open object properties dialog
	if ( !pObj )
		return false;

	RESOURCE_ID rid = g_Cfg.ResourceGetIDType(RES_DIALOG, pObj->IsItem() ? "d_ITEMPROP1" : "d_CHARPROP1");
	if ( !rid.IsValidUID() )
		return false;

	m_Prop_UID = m_Targ_UID = pObj->GetUID();
	Dialog_Setup(CLIMODE_DIALOG, rid, 0, pObj);
	return true;
}