public OtherPlayerData(st.net.NetBase.scene_ply _info) { serverInstanceID = (int)_info.pid; name = _info.name; guildName = _info.guildName; baseValueDic[ActorBaseTag.Level] = _info.level; prof = (int)_info.prof; startPosX = _info.x; startPosY = _info.y; startPosZ = _info.z; dir = (int)_info.dir; camp = (int)_info.camp; teamID = (int)_info.team_id; titleID = (int)_info.title; leaderID = (int)_info.team_leader; smallStrenLev = _info.strenthen_min_lev; equipTypeList.Clear(); if (_info.magic_weapon_id > 0) { RefineRef rr = ConfigMng.Instance.GetRefineRef(_info.magic_weapon_id, _info.magic_strength_lev, _info.magic_strength_star); if (rr != null) { magicWeaponID = rr.model; } } if (_info.wing_id > 0) { WingRef data = ConfigMng.Instance.GetWingRef(_info.wing_id, _info.wing_lev); if (data != null) { equipTypeList.Add(data.itemui); } } for (int i = 0, max = _info.model_clothes_id.Count; i < max; i++) { equipTypeList.Add((int)_info.model_clothes_id[i]); } propertyValueDic[ActorPropertyTag.HPLIMIT] = (int)_info.max_hp; propertyValueDic[ActorPropertyTag.MOVESPD] = (int)_info.move_speed; baseValueDic[ActorBaseTag.CurHP] = _info.hp; baseValueDic[ActorBaseTag.FightValue] = _info.fighting; baseValueDic[ActorBaseTag.SLALEVEL] = _info.pk_level; baseValueDic[ActorBaseTag.CounterAttack] = (uint)_info.counter_status; //Debug.Log("_info.move_speed:"+_info.move_speed); }
/// <summary> /// 玩家出视野,再进视野,需更新信息 /// </summary> /// <param name="_info"></param> public void Update(st.net.NetBase.scene_ply _info) { serverInstanceID = (int)_info.pid; name = _info.name; guildName = _info.guildName; baseValueDic[ActorBaseTag.Level] = _info.level; prof = (int)_info.prof; startPosX = _info.x; startPosY = _info.y; startPosZ = _info.z; dir = (int)_info.dir; camp = (int)_info.camp; teamID = (int)_info.team_id; titleID = (int)_info.title; leaderID = (int)_info.team_leader; smallStrenLev = _info.strenthen_min_lev; propertyValueDic[ActorPropertyTag.HPLIMIT] = (int)_info.max_hp; propertyValueDic[ActorPropertyTag.MOVESPD] = (int)_info.move_speed; baseValueDic[ActorBaseTag.CurHP] = _info.hp; baseValueDic[ActorBaseTag.FightValue] = _info.fighting; baseValueDic[ActorBaseTag.SLALEVEL] = _info.pk_level; baseValueDic[ActorBaseTag.CounterAttack] = (uint)_info.counter_status; }
/// <summary> /// 构造 by吴江 /// </summary> /// <param name="_actorData"></param> public OtherPlayerInfo(st.net.NetBase.scene_ply _info, List <int> _equipList, bool _isInFight) { serverData = new OtherPlayerData(_info); if (_equipList != null && _equipList.Count > 0) { serverData.equipTypeList.AddRange(_equipList); } serverData.isInFight = _isInFight; IsAlive = serverData.baseValueDic.ContainsKey(ActorBaseTag.CurHP)?(serverData.baseValueDic[ActorBaseTag.CurHP] != 0):true; //其他玩家是否死亡和复活 List <int> defaultEquipList = RefData == null?new List <int>():RefData.defaultEquipList; foreach (var item in defaultEquipList) { EquipmentInfo eq = new EquipmentInfo(item, EquipmentBelongTo.EQUIP); if (defaultDictionary.ContainsKey(eq.Slot)) { GameSys.LogError(ConfigMng.Instance.GetUItext(213)); } defaultDictionary[eq.Slot] = eq; } RefineRef rr = ConfigMng.Instance.GetRefineRef(_info.magic_weapon_id, _info.magic_strength_lev, _info.magic_strength_star); if (rr != null) { serverData.magicWeaponID = rr.model; if (serverData.equipTypeList.Contains(serverData.magicWeaponID)) { if (!GameCenter.systemSettingMng.OtherPlayerMagic) { serverData.equipTypeList.Remove(serverData.magicWeaponID); } } else { if (GameCenter.systemSettingMng.OtherPlayerMagic) { serverData.equipTypeList.Add(serverData.magicWeaponID); } } } WingRef data = null; if (_info.wing_id > 0) { data = ConfigMng.Instance.GetWingRef(_info.wing_id, _info.wing_lev); } if (data != null) { serverData.wingID = data.itemui; if (serverData.equipTypeList.Contains(serverData.wingID)) { if (!GameCenter.systemSettingMng.OtherPlayerWing) { serverData.equipTypeList.Remove(serverData.wingID); } } else { if (GameCenter.systemSettingMng.OtherPlayerWing) { serverData.equipTypeList.Add(serverData.wingID); } } } ProcessServerData(serverData); if (_info.ride_type > 0) { curMountInfo = new MountInfo(_info, this); } }