本文整理汇总了C++中CBaseMonster::cNameSect方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseMonster::cNameSect方法的具体用法?C++ CBaseMonster::cNameSect怎么用?C++ CBaseMonster::cNameSect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseMonster
的用法示例。
在下文中一共展示了CBaseMonster::cNameSect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetPartner
void CUIActorMenu::SetPartner(CInventoryOwner* io)
{
R_ASSERT (!IsShown());
m_pPartnerInvOwner = io;
if ( m_pPartnerInvOwner )
{
CBaseMonster* monster = smart_cast<CBaseMonster*>( m_pPartnerInvOwner );
if ( monster || m_pPartnerInvOwner->use_simplified_visual() )
{
m_PartnerCharacterInfo->ClearInfo();
if ( monster )
{
shared_str monster_tex_name = pSettings->r_string( monster->cNameSect(), "icon" );
// m_PartnerCharacterInfo->UIIcon().InitTexture( monster_tex_name.c_str() );
// m_PartnerCharacterInfo->UIIcon().SetStretchTexture( true );
m_PartnerCharacterInfo->InitMonsterCharacter(monster_tex_name);
}
}
else
{
m_PartnerCharacterInfo->InitCharacter( m_pPartnerInvOwner->object_id() );
}
SetInvBox( NULL );
}
else
{
m_PartnerCharacterInfo->ClearInfo();
}
}
示例2: InitCarBody
void CUICarBodyWnd::InitCarBody(CInventoryOwner* pOur, CInventoryOwner* pOthers)
{
m_pOurObject = pOur;
m_pOthersObject = pOthers;
m_pInventoryBox = NULL;
u16 our_id = smart_cast<CGameObject*>(m_pOurObject)->ID();
u16 other_id = smart_cast<CGameObject*>(m_pOthersObject)->ID();
m_pUICharacterInfoLeft->InitCharacter (our_id);
m_pUIOthersIcon->Show (true);
CBaseMonster *monster = NULL;
if(m_pOthersObject) {
monster = smart_cast<CBaseMonster *>(m_pOthersObject);
if (monster || m_pOthersObject->use_simplified_visual() )
{
m_pUICharacterInfoRight->ClearInfo ();
if(monster)
{
shared_str monster_tex_name = pSettings->r_string(monster->cNameSect(),"icon");
m_pUICharacterInfoRight->UIIcon().InitTexture(monster_tex_name.c_str());
m_pUICharacterInfoRight->UIIcon().SetStretchTexture(true);
}
}else
{
m_pUICharacterInfoRight->InitCharacter (other_id);
}
}
m_pUIPropertiesBox->Hide ();
EnableAll ();
UpdateLists ();
if(!monster){
CInfoPortionWrapper *known_info_registry = xr_new<CInfoPortionWrapper>();
known_info_registry->registry().init (other_id);
KNOWN_INFO_VECTOR& known_info = known_info_registry->registry().objects();
KNOWN_INFO_VECTOR_IT it = known_info.begin();
for(int i=0;it!=known_info.end();++it,++i){
(*it).info_id;
NET_Packet P;
CGameObject::u_EventGen (P,GE_INFO_TRANSFER, our_id);
P.w_u16 (0);//not used
P.w_stringZ ((*it).info_id); //сообщение
P.w_u8 (1); //добавление сообщения
CGameObject::u_EventSend (P);
}
known_info.clear ();
xr_delete (known_info_registry);
}
}