using Games.GlobeDefine; using Games.LogicObj; using GCGame.Table; using UnityEngine; public class TeamMember { private int _EffectAuraId = -1; private int _FollowState = TeamFollowState.notSet; private int _WeaponGemEffect = -1; private int _WeaponGemEffect2 = -1; private int _WeaponGemEffect3 = -1; private int _WingAuraId = -1; public TeamMember() { CleanUp(); } public ulong Guid { get; set; } public string MemberName { get; set; } public int Level { get; set; } public int Profession { get; set; } public long HP { get; set; } public long MaxHP { get; set; } public int TeamJob { get; set; } public int CombatNum { get; set; } public Vector2 ScenePos { get; set; } public int ModelVisual { get; set; } public int WeaponData { get; set; } public int WeaponGemEffect { get { return _WeaponGemEffect; } set { _WeaponGemEffect = value; } } public int WeaponGemEffect2 { get { return _WeaponGemEffect2; } set { _WeaponGemEffect2 = value; } } public int WeaponGemEffect3 { get { return _WeaponGemEffect3; } set { _WeaponGemEffect3 = value; } } public int EffectAuraId { set { _EffectAuraId = value; } get { return _EffectAuraId; } } public int WingAurId { set { _WingAuraId = value; } get { return _WingAuraId; } } public bool EnsureFuben { get; set; } public int FollowState { get { return _FollowState; } set { if (_FollowState != value) { ridingMatchLead = false; if (_FollowState == TeamFollowState.notFollow) { var mainPlayer = ObjManager.Instance.MainPlayer; if (mainPlayer != null && mainPlayer.GUID == Guid) { var leader = GameManager.gameManager.PlayerDataPool.TeamInfo.teamMember[0]; if (leader.Guid != Guid && leader.SceneClassID != SceneClassID) { if (!Obj_MainPlayer.AllowCallIn(leader.SceneClassID, SceneClassID)) GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{5144}")); // 2019.01.04 改为服务器判定队长是否在线 //else if (!leader.IsOnline) // GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{52013}")); } } } _FollowState = value; } } } public float MoveSpeed { get; set; } public int SceneClassID { get { return _sceneClassId; } set { if (_sceneClassId != value) { ridingMatchLead = false; _sceneClassId = value; } } } private int _sceneClassId; public int SceneInstID { get { return _sceneInstId; } set { if (_sceneInstId != value) { ridingMatchLead = false; _sceneInstId = value; } } } public bool IsOnline = true; private int _sceneInstId; public void CleanUp() { Guid = GlobeVar.INVALID_GUID; MemberName = string.Empty; Level = 0; Profession = 0; HP = 0; MaxHP = 0; CombatNum = 0; SceneClassID = GlobeVar.INVALID_ID; SceneInstID = GlobeVar.INVALID_ID; ScenePos = Vector2.zero; warpFreezeTime = 0f; teleportFreezeTime = 0f; } public bool IsValid() { return Guid != GlobeVar.INVALID_GUID; } public bool FollowLeader() { return IsValid() && FollowState != TeamFollowState.notFollow; } #region client prop /// /// 队员跳跃中,被锁定移动到这个时间 /// public float warpFreezeTime; /// /// 队员传送中,被锁定移动到这个时间 /// public float teleportFreezeTime; /// /// 是否需要更新骑乘状态 /// // 仅仅用于在队员场景切换等等情况下重置为false,使队长可以在切换状态时刷新这个标志位; // 队员进入跟随状态,无论任何情况,都会试图同队长骑乘状态执行一次匹配 public bool ridingMatchLead; #endregion }