Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | _player.ActorInfo.ResetHp((int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.MaxHP: |
| | | _player.ActorInfo.SyncServerHpEx = vNetData.Value; |
| | | _player.ActorInfo.ResetHp(-1, -1, (int)vNetData.Value); |
| | | break; |
| | | case PlayerDataRefresh.Family: |
| | |
| | |
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | // Debug.LogFormat("{0} 血量改变: {1}", ServerInstID, value);
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | | {
|
| | |
| | | set |
| | | { |
| | | _syncHpex = value; |
| | | //if (sid != PlayerDatas.Instance.PlayerId) |
| | | //{ |
| | | // Debug.LogFormat("<color=green>============ 设置 {1} 血量Ex: {0}</color>", _syncHpex, sid); |
| | | //} |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=green>============ 设置 {1} 血量Ex: {0}</color>", _syncHpex, sid); |
| | | // } |
| | | } |
| | | }// 服务端血量Ex的校准值 |
| | | |
| | |
| | | MaxHpEx = (ushort)valMaxEx; |
| | | } |
| | | |
| | | //if (sid != PlayerDatas.Instance.PlayerId) |
| | | //{ |
| | | // Debug.LogFormat("<color=yellow>设置NPC {0}, 当前hp: {1}, hpEx: {2}</color>", sid, Hp, HpEx); |
| | | //} |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=yellow>设置血量 {0}, 当前hp: {1}, hpEx: {2}</color>", sid, Hp, HpEx); |
| | | // } |
| | | |
| | | if (OnHpChange != null) |
| | | { |
| | |
| | | |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // Debug.LogFormat("<color=red>伤血量: {0}, 当前hp: {1}, hpEx: {2}</color>", value, Hp, HpEx); |
| | | // Debug.LogFormat("<color=red> 伤血量: {0}, 当前hp: {1}, hpEx: {2}</color>", value, Hp, HpEx); |
| | | // } |
| | | |
| | | if (_multiple > HpEx) |
| | |
| | | Hp -= value; |
| | | } |
| | | |
| | | // if (sid != PlayerDatas.Instance.PlayerId) |
| | | // { |
| | | // if (HpEx > 0) |
| | | // { |
| | | // Debug.Log("Error"); |
| | | // } |
| | | // } |
| | | |
| | | if (HpEx * FullHp + Hp < SyncServerHpEx * FullHp + SyncServerHp) |
| | | { |
| | | Hp = SyncServerHp; |
| | |
| | | private GameObject m_ClothesModel;
|
| | | private GameObject m_WeaponModel;
|
| | | private GameObject m_SecondaryModel;
|
| | | private GameObject m_HandModel;
|
| | | private GameObject m_WingModel;
|
| | | private GameObject m_HorseModel;
|
| | | private GA_Guard m_Guard;
|
| | |
| | | return; |
| | | } |
| | | textBuilder.Length = 0; |
| | | var start = quickRange.index + index * quickRange.single; |
| | | var start = quickRange.index + index * quickRange.single;
|
| | | var end = start + value.Length; |
| | | if (quickRange.length == quickRange.single)
|
| | | {
|
| | | end = start + quickRange.length;
|
| | | } |
| | | textBuilder.Append(setting, 0, start); |
| | | textBuilder.Append(value); |
| | | if (quickRange.length == quickRange.single
|
| | | && quickRange.length > value.Length)
|
| | | {
|
| | | textBuilder.Append('*', quickRange.length - value.Length);
|
| | | } |
| | | textBuilder.Append(setting, end, setting.Length - end); |
| | | setting = textBuilder.ToString(); |
| | | PlayerDatas.Instance.baseData.Setting = setting; |