// Port of C++ EC_Team.h/cpp CECTeamMember - one teammate in a party. using BrewMonster; using BrewMonster.Managers; using CSNetwork.GPDataType; using UnityEngine; namespace BrewMonster { public class CECTeamMember { protected bool m_bInfoReady; protected CECTeam m_pTeam; protected int m_cid; protected int m_iLevel; protected int m_iLevel2; protected int m_iWallowLevel; protected int m_iCurHP; protected int m_iCurMP; protected int m_iMaxHP; protected int m_iMaxMP; protected bool m_bFight; protected int m_idInst; protected A3DVECTOR3 m_vPos; protected bool m_bSameInstance; protected int m_iProfession; protected int m_iGender; protected int m_iForce; protected int m_iProfitLevel; protected int m_iReincarnationCount; public CECTeamMember(CECTeam pTeam, int cid) { m_bInfoReady = false; m_pTeam = pTeam; m_cid = cid; m_iLevel = 0; m_iLevel2 = 0; m_iWallowLevel = 0; m_iCurHP = 0; m_iCurMP = 0; m_iMaxHP = 0; m_iMaxMP = 0; m_bFight = false; m_idInst = 0; m_vPos = new A3DVECTOR3(0, 0, 0); m_bSameInstance = false; m_iProfession = 0; // PROF_WARRIOR m_iGender = 0; // GENDER_MALE m_iForce = 0; m_iProfitLevel = -1; m_iReincarnationCount = 0; } /// Resolve display name from EC_ManPlayer (else player name set when PLAYER_BASE_INFO received). public string GetName() { var pm = EC_ManMessageMono.Instance?.GetECManPlayer; if (pm != null) { var p = pm.GetPlayer(m_cid, 0); if (p != null) { string name = p.GetName(); if (!string.IsNullOrEmpty(name)) return name; if (p.gameObject != null && !string.IsNullOrEmpty(p.gameObject.name)) return p.gameObject.name; } } return "Player_" + m_cid; } public bool IsInfoReady() { return m_bInfoReady; } public void SetInfoReadyFlag(bool b) { m_bInfoReady = b; } public int GetCharacterID() { return m_cid; } public void SetLevel(int i) { m_iLevel = i; } public int GetLevel() { return m_iLevel; } public void SetLevel2(int i) { m_iLevel2 = i; } public int GetLevel2() { return m_iLevel2; } public void SetWallowLevel(int i) { m_iWallowLevel = i; } public int GetWallowLevel() { return m_iWallowLevel; } public void SetCurHP(int i) { m_iCurHP = i; } public int GetCurHP() { return m_iCurHP; } public void SetCurMP(int i) { m_iCurMP = i; } public int GetCurMP() { return m_iCurMP; } public void SetMaxHP(int i) { m_iMaxHP = i; } public int GetMaxHP() { return m_iMaxHP; } public void SetMaxMP(int i) { m_iMaxMP = i; } public int GetMaxMP() { return m_iMaxMP; } public void SetPos(int idInst, A3DVECTOR3 vPos, bool bSameInstance) { m_idInst = idInst; m_vPos = vPos; m_bSameInstance = bSameInstance; } public A3DVECTOR3 GetPos() { return m_vPos; } public int GetInstanceID() { return m_idInst; } public bool GetSameInstance() { return m_bSameInstance; } public void SetProfession(int i) { m_iProfession = i; } public int GetProfession() { return m_iProfession; } public bool IsFighting() { return m_bFight; } public void SetFightFlag(bool b) { m_bFight = b; } public void SetGender(int i) { m_iGender = i; } public int GetGender() { return m_iGender; } public void SetForce(int i) { m_iForce = i; } public int GetForce() { return m_iForce; } public void SetProfitLevel(int i) { m_iProfitLevel = i; } public int GetProfitLevel() { return m_iProfitLevel; } public void SetReincarnationCount(int count) { m_iReincarnationCount = count; } public int GetReincarnationCount() { return m_iReincarnationCount; } } }