Esempio n. 1
0
    // 得到自己的队伍信息(从自己的数据池获取)
    void FillMyInfo(TeamMemberInfo member)
    {
        if (member == null)
        {
            throw new NullReferenceException("team member in FillMyInfo(member)");
        }

        CObject_PlayerMySelf pMe = CObjectManager.Instance.getPlayerMySelf();

        CCharacterData pMyData = pMe.GetCharacterData();

        if (null == pMyData)
        {
            return;
        }
        member.m_szNick        = pMyData.Get_Name();
        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        = 100; // 客户端没有
        member.m_WeaponID      = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_WEAPON);
        member.m_CapID         = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_CAP);
        member.m_ArmourID      = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_ARMOR);
        member.m_CuffID        = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_CUFF);
        member.m_FootID        = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_BOOT);
        member.m_uBackID       = pMyData.Get_Equip(HUMAN_EQUIP.HEQUIP_BACK);//  [8/30/2010 Sun]
        member.m_bDead         = (pMe.CharacterLogic_Get() == ENUM_CHARACTER_LOGIC.CHARACTER_LOGIC_DEAD);

        member.m_uFaceMeshID = pMyData.Get_FaceMesh();
        member.m_uHairMeshID = pMyData.Get_HairMesh();
        member.m_uHairColor  = pMyData.Get_HairColor();
    }