void KUiParadeItem::UpdateAllEquips(KUiPlayerItem* pDest) { if (!g_pCoreShell) return; KUiObjAtRegion Equips[_ITEM_COUNT]; int nCount = g_pCoreShell->GetGameData(GDI_PARADE_EQUIPMENT, (unsigned int)&Equips, 0); int i; for (i = 0; i < _ITEM_COUNT; i++) m_EquipBox[i].Celar(); for (i = 0; i < nCount; i++) { if (Equips[i].Obj.uGenre != CGOG_NOTHING) UpdateEquip(&Equips[i], true); } }
VOID CObject_PlayerOther::CreateRenderInterface(VOID) { if(m_pCharRace != NULL) { //模型定义 DBC_DEFINEHANDLE(s_pCharModelDBC, DBC_CHARACTER_MODEL) LPCSTR lpszModelFileName = NULL; INT nModelID = GetCharModelID(); const _DBC_CHARACTER_MODEL *pCharModel = (const _DBC_CHARACTER_MODEL*)(s_pCharModelDBC->Search_Index_EQU(nModelID)); if(pCharModel != NULL) { lpszModelFileName = pCharModel->m_pszModelName; } if(lpszModelFileName != NULL) { m_pRenderInterface = CGameProcedure::s_pGfxSystem->New_EntityObject(tEntityNode::ETYPE_ACTOR); m_pRenderInterface->SetData(GetID()); //设置ActorFile m_pRenderInterface->Actor_SetFile( lpszModelFileName ); if (GetConstCharacterData()->Get_ModelID() == -1) { UpdateFaceMesh(); UpdateHairMesh(); UpdateHairColor(); //重新刷新装备 UpdateEquip( HEQUIP_WEAPON ); UpdateEquip( HEQUIP_CAP ); UpdateEquip( HEQUIP_ARMOR ); UpdateEquip( HEQUIP_CUFF ); UpdateEquip( HEQUIP_BOOT ); UpdateEquip( HEQUIP_SASH ); } SendEuipRequest(); } } CObject_Character::CreateRenderInterface(); }
UseEquipWidget::UseEquipWidget(): Gui::Fixed(400,100) { m_onPlayerEquipChangedCon = Pi::onPlayerChangeEquipment.connect(sigc::mem_fun(this, &UseEquipWidget::UpdateEquip)); UpdateEquip(); }
VOID CObject_PlayerOther::OnDataChanged_Equip(HUMAN_EQUIP point) { UpdateEquip(point); }
VOID CObject_PlayerOther::OnShowWeapon(VOID) { UpdateEquip(HEQUIP_WEAPON); }