Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | |
| | | protected bool SearchActor = false; |
| | | |
| | | private void OnHpChange(uint value) |
| | | private void OnHpChange(ulong value) |
| | | { |
| | | SearchActor = true; |
| | | } |
| | |
| | | {
|
| | | if (_target.ActorInfo.RealHp < _hurtValue)
|
| | | {
|
| | | _hurtValue = _target.ActorInfo.RealHp - 10;
|
| | | _hurtValue = (uint)(_target.ActorInfo.RealHp - 10);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (_pencent > 0.4f)
|
| | | {
|
| | | target.ActorInfo.ReduceHp((uint)_realHurt);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(target.ActorInfo.Hp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)target.ActorInfo.Hp);
|
| | | }
|
| | | }
|
| | | else if (target is GA_NpcClientFightBoss)
|
| | |
| | |
|
| | | if (target.ServerInstID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(target.ActorInfo.RealHp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)target.ActorInfo.RealHp);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public uint clientInstID;
|
| | | public byte AttackType;
|
| | | public uint HurtHP;
|
| | | public uint CurHP;
|
| | | public ulong CurHP;
|
| | | public uint CurHPEx;
|
| | | }
|
| | | }
|
| | |
| | | // 主角血量扣除的补充
|
| | | if (_target.ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp(_target.ActorInfo.SyncServerHp);
|
| | | PlayerDatas.Instance.FightRefreshPlayerHp((uint)_target.ActorInfo.SyncServerHp);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public override void RequestName()
|
| | | {
|
| | |
| | | } |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | if (s_HpRefresh != null) |
| | | { |
| | |
| | | m_LifeBar = LifeBar.RequireLifeBar(MP_Name, 0, CameraController.Instance.CameraObject); |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | if (m_LifeBar) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public override void RefreshLifeBar(uint value) |
| | | public override void RefreshLifeBar(ulong value) |
| | | { |
| | | // 非选中状态下不刷新 |
| | | if (s_HpRefresh != null) |
| | |
| | | m_LifeBar.Set(ActorInfo.RealHp, ActorInfo.RealMaxHp);
|
| | | }
|
| | |
|
| | | public override void RefreshLifeBar(uint value)
|
| | | public override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | if (m_LifeBar)
|
| | | {
|
| | |
| | |
|
| | | public sealed override void RequestLifeBar() { }
|
| | | public sealed override void ReleaseLifeBar() { }
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public sealed override void RequestName() { }
|
| | | public sealed override void ReleaseName() { }
|
| | |
| | |
|
| | | public sealed override void RequestLifeBar() { }
|
| | | public sealed override void ReleaseLifeBar() { }
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | //#if UNITY_EDITOR
|
| | | // UnityEditor.EditorApplication.isPaused = true;
|
| | |
| | | base.SwitchYellowName(on);
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value) { }
|
| | | public sealed override void RefreshLifeBar(ulong value) { }
|
| | |
|
| | | public sealed override void RequestName()
|
| | | {
|
| | |
| | | {
|
| | | }
|
| | |
|
| | | public sealed override void RefreshLifeBar(uint value)
|
| | | public sealed override void RefreshLifeBar(ulong value)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero != null && _hero.SelectTarget == this)
|
| | |
| | | public abstract bool CanAtked();
|
| | | public abstract bool CanAtkedRotate();
|
| | |
|
| | | public abstract void RefreshLifeBar(uint value);
|
| | | public abstract void RefreshLifeBar(ulong value);
|
| | |
|
| | | public void Die(uint killerServerInstID, int configID = 0)
|
| | | {
|
| | |
| | | public class PropValEx |
| | | { |
| | | // 当前值 |
| | | public uint val; |
| | | public ulong val; |
| | | // 最大值 |
| | | public uint max; |
| | | public ulong max; |
| | | // 扩展值 |
| | | public uint valEx; |
| | | // 最大值扩展值 |
| | |
| | | /// <summary> |
| | | /// 血量改变事件 |
| | | /// </summary> |
| | | public event UnityAction<uint> OnHpChange; |
| | | public event UnityAction<ulong> OnHpChange; |
| | | /// <summary> |
| | | /// 血量 |
| | | /// </summary> |
| | | private PropValEx pveHp = new PropValEx(); |
| | | |
| | | private uint _synchp; |
| | | public uint SyncServerHp |
| | | private ulong _synchp; |
| | | public ulong SyncServerHp |
| | | { |
| | | get { return _synchp; } |
| | | set |
| | |
| | | } |
| | | }// 服务端血量Ex的校准值 |
| | | |
| | | public uint Hp |
| | | public ulong Hp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint MaxHp |
| | | public ulong MaxHp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint RealHp |
| | | public ulong RealHp |
| | | { |
| | | get |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public uint RealMaxHp |
| | | public ulong RealMaxHp |
| | | { |
| | | get |
| | | { |
| | |
| | | XBModel.SendOneXBQuest(PackType.rptTreasure, 1);
|
| | | break;
|
| | | case HappXBTitle.Rune:
|
| | | XBModel.SendOneXBQuest(PackType.rptRunePack, 2);
|
| | | XBModel.SendOneXBQuest(PackType.rptTreasure, 2);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | XBModel.SendXBManyQuest(PackType.rptTreasure, 1);
|
| | | break;
|
| | | case HappXBTitle.Rune:
|
| | | XBModel.SendXBManyQuest(PackType.rptRunePack, 2);
|
| | | XBModel.SendXBManyQuest(PackType.rptTreasure, 2);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | return false;
|
| | | }
|
| | | break;
|
| | | case PackType.rptItem:
|
| | | if (playerPack.GetReaminGridCount(type) < needGrid)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
| | | bool isXBMany = false;
|
| | | private void ClickXBManyBtn()
|
| | | {
|
| | | XBModel.SendXBManyQuest(PackType.rptRunePack, 2);
|
| | | XBModel.SendXBManyQuest(PackType.rptTreasure, 2);
|
| | | }
|
| | |
|
| | | private void ClickXBBtn()
|
| | | {
|
| | | XBModel.SendOneXBQuest(PackType.rptRunePack, 2);
|
| | | XBModel.SendOneXBQuest(PackType.rptTreasure, 2);
|
| | | }
|
| | |
|
| | | private void ClickFreeXbBtn()
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptTreasure))
|
| | | {
|
| | | XBModel.SendXBQuest(2, 0, 1);
|
| | | }
|
| | |
| | | using System; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | |
| | | |
| | | private void ClickItemCell(ItemModel itemModel) |
| | | { |
| | | if(playerPack.GetReaminGridCount(PackType.rptItem) > 0) |
| | | { |
| | | XBModel.SendPutOutXBItem(PackType.rptTreasure, PackType.rptItem, itemModel.itemInfo.ItemPlace, 0); |
| | | if(itemModel.chinItemModel.Type == 30 || itemModel.chinItemModel.Type == 31)
|
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptRunePack))
|
| | | {
|
| | | XBModel.SendPutOutXBItem(PackType.rptTreasure, PackType.rptRunePack, itemModel.itemInfo.ItemPlace, 0);
|
| | | }
|
| | | } |
| | | else |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("BagFull"); |
| | | {
|
| | | if (XBModel.CheckIsEmptyGrid(PackType.rptItem))
|
| | | {
|
| | | XBModel.SendPutOutXBItem(PackType.rptTreasure, PackType.rptItem, itemModel.itemInfo.ItemPlace, 0);
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | private void RefreshItemCount(PackType type, int index, int id) |
| | |
| | |
|
| | | private void ClickPutOutBtn()
|
| | | {
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) > 0)
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptTreasure);
|
| | | if (singlePack == null) return;
|
| | | Dictionary<int, ItemModel> pairs = singlePack.GetPackModelIndexDict();
|
| | | bool isHaveItem = false;
|
| | | bool isHaveRune = false;
|
| | | foreach(var value in pairs.Values)
|
| | | {
|
| | | if(value.chinItemModel.Type == 30 || value.chinItemModel.Type == 31)
|
| | | {
|
| | | isHaveRune = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | isHaveItem = true;
|
| | | }
|
| | | if(isHaveRune && isHaveItem)
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if((isHaveItem && XBModel.CheckIsEmptyGrid(PackType.rptItem))
|
| | | || (isHaveRune && XBModel.CheckIsEmptyGrid(PackType.rptRunePack)))
|
| | | {
|
| | | XBModel.SendPutOutXBItem(PackType.rptTreasure, PackType.rptItem, 0, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | void DefaultDialogue()//关于打开默认对话界面
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing)
|
| | | {
|
| | | return;
|
| | | }
|
| | | bool IsOpenMain = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
|
| | | if (!WindowCenter.Instance.CheckOpen<DefaultDialogueBoxWin>() && IsOpenMain)
|
| | | {
|