VOID CTeamOrGroup::FillMyInfo(TeamMemberInfo* member) { Assert( member ); CObject_PlayerMySelf* pMe = CObjectManager::GetMe()->GetMySelf(); Assert( member->m_GUID == pMe->GetServerGUID() ); CCharacterData* pMyData = pMe->GetCharacterData(); if(NULL == pMyData) { return ; } strncpy(member->m_szNick, pMyData->Get_Name(), MAX_CHARACTER_NAME-1); std::string utfstr; StringConvert::mbcs_to_utf8(member->m_szNick,utfstr); strncpy(member->m_szUtf8Nick,utfstr.c_str(),MAX_CHARACTER_NAME*2-1); member->m_szNick[MAX_CHARACTER_NAME-1] = '\0'; member->m_szUtf8Nick[MAX_CHARACTER_NAME*2-1]; member->m_uFamily = pMyData->Get_MenPai(); member->m_uDataID = pMyData->Get_RaceID(); member->m_uLevel = pMyData->Get_Level(); member->m_nPortrait = pMyData->Get_PortraitID(); // 头像 member->m_WorldPos.m_fX = pMe->GetPosition().x; member->m_WorldPos.m_fZ = pMe->GetPosition().z; member->m_nHP = pMyData->Get_HP(); member->m_dwMaxHP = pMyData->Get_MaxHP(); member->m_nMP = pMyData->Get_MP(); member->m_dwMaxMP = pMyData->Get_MaxMP(); member->m_nAnger = pMyData->Get_Rage(); // 怒气 member->m_WeaponID = pMyData->Get_Equip(HEQUIP_MAINHAND); member->m_AssiID = pMyData->Get_Equip(HEQUIP_ASSIHAND); member->m_CapID = pMyData->Get_Equip(HEQUIP_HEAD); member->m_ArmourID = pMyData->Get_Equip(HEQUIP_BACK); member->m_ShoulderID = pMyData->Get_Equip(HEQUIP_SHOULDER); member->m_CuffID = pMyData->Get_Equip(HEQUIP_WRIST); member->m_FootID = pMyData->Get_Equip(HEQUIP_FEET); member->m_uFaceMeshID = pMyData->Get_FaceMesh(); member->m_uHairMeshID = pMyData->Get_HairMesh(); member->m_uHairColor = pMyData->Get_HairColor(); member->m_bDead = ( pMe->CharacterLogic_Get( CObject_Character::LOGIC_BASE ) == CObject_Character::CHARACTER_LOGIC_DEAD ); }
VOID CObject_PlayerOther::UpdateEquip(HUMAN_EQUIP point) { CCharacterData *pCharacterData = GetCharacterData(); if(pCharacterData == NULL) { return ; } if(point == HEQUIP_WEAPON && IsHideWeapon()) { return ; } if(!GetFakeObjectFlag()) { if(pCharacterData->Get_ModelID() != INVALID_ID) { return ; } } //生成一个临时的Item对象 CObject_Item_Equip *pTempEquip = NULL; INT nID = pCharacterData->Get_Equip(point); if(nID != INVALID_ID) { pTempEquip = (CObject_Item_Equip *)CObject_Item::NewItem(nID); } //如果是装备根据装配点装备物品 if(pTempEquip != NULL && ICLASS_EQUIP == pTempEquip->GetItemClass()) { switch(pTempEquip->GetItemType()) { case HEQUIP_WEAPON: //武器,挂接类装备 { EquipItem_BodyLocator(pTempEquip->GetItemType(), pTempEquip->GetVisualID()); SetWeaponType( pTempEquip->GetWeaponType() ); } break; case HEQUIP_CAP: //帽子, 身体, 手臂, 鞋, 装备类物品 case HEQUIP_ARMOR: case HEQUIP_CUFF: case HEQUIP_BOOT: { EquipItem_BodyPart(pTempEquip->GetItemType(), pTempEquip->GetVisualID()); } break; case HEQUIP_SASH: //腰带, 戒子, 项链 case HEQUIP_RING: case HEQUIP_NECKLACE: default: break; } } else { //卸载装备 UnEquipItem(point); } //如果是UI物体,重新设置VisibleFlag if(GetFakeObjectFlag()) { m_pRenderInterface->Actor_SetUIVisibleFlag(); } CObject_Item::DestroyItem(pTempEquip); }