Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | _player.SwitchRealm((int)vNetData.Value); |
| | | } |
| | | } |
| | | |
| | | OpponentInformation.Instance.GetOpponentInformation0418(vNetData);//用于获取玩家护盾属性 |
| | | if (PlayerDatas.Instance.PlayerId == vNetData.ObjID) |
| | | { |
| | | PlayerDatas.Instance.RefreshPlayerData(vNetData); |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | //04 34 周围玩家出现合并封包#tagAreaPlayerAppearEx
|
| | |
|
| | |
| | | {
|
| | | // 异常
|
| | | }
|
| | |
|
| | | OpponentInformation.Instance.GetOpponentInformation0434(vNetData);//用于获取玩家护盾属性
|
| | | BattleEffectPlayRule.Instance.AddPlayer(vNetData.PlayerID);
|
| | |
|
| | | // 离线玩家
|
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(SettingEffectMgr); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 3, 3, 2); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 3, 2, 2); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Begin", _m_Begin); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetSettingEffect", _m_GetSettingEffect); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshBagItem", _m_RefreshBagItem); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isPlayerDie", _g_get_isPlayerDie); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isStartDecompose", _g_get_isStartDecompose); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isStartDecompose", _g_get_isStartDecompose); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isStartOneKeySell", _g_get_isStartOneKeySell); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "isStartDecompose", _s_set_isStartDecompose); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_isPlayerDie(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | SettingEffectMgr gen_to_be_invoked = (SettingEffectMgr)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isPlayerDie); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_isStartDecompose(RealStatePtr L) |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e64bf687f119c3549adf2cb6190dbe30 |
| | | timeCreated: 1545203737 |
| | | timeCreated: 1546002340 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | else
|
| | | {
|
| | | matchBtn_Img.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | matchBtn.AddListener(() => { SysNotifyMgr.Instance.ShowTip("CrossMatching20"); });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void UpdateFBHelp()
|
| | | {
|
| | | int dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | if (dataMapId != CrossServerDataMapId) return;
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 != 1) return;
|
| | |
|
| | | var mission = dungeonModel.mission;
|
| | | if(mission.prepareTime > 0)
|
| | |
| | | public bool TryGetMatchTip()
|
| | | {
|
| | | int mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | int dataMapId = dungeonModel.GetDataMapIdByMapId(mapId);
|
| | | bool isCrossDungeon = dataMapId == CrossServerDataMapId;
|
| | | bool isCrossDungeon = PlayerDatas.Instance.baseData.ExAttr5 == 1;
|
| | | if(isCrossDungeon)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching3");
|
| | |
| | | PlayerBuffDatas.Even_ObjAddBuf += AddBuff;
|
| | | PlayerBuffDatas.Even_ObjDelBuff += DelBuff; |
| | | PlayerBuffDatas.BuffUpdateEvent += BuffUpdateEvent; |
| | | OpponentInformation.Instance.ShieldUpdate += ShieldUpdate; |
| | | }
|
| | |
|
| | |
|
| | |
| | | dungeonModel.updateMissionEvent -= UpdateMissionEvent;
|
| | | PlayerBuffDatas.Even_ObjAddBuf -= AddBuff;
|
| | | PlayerBuffDatas.Even_ObjDelBuff -= DelBuff;
|
| | | PlayerBuffDatas.BuffUpdateEvent -= BuffUpdateEvent; |
| | | PlayerBuffDatas.BuffUpdateEvent -= BuffUpdateEvent;
|
| | | OpponentInformation.Instance.ShieldUpdate -= ShieldUpdate; |
| | | }
|
| | |
|
| | |
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | |
| | | OnCreateGridLineCel2(m_ScrollerController2);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void BuffUpdateEvent(int playerID)
|
| | | {
|
| | | int opponentPlayerId = CrossServerLogin.Instance.oneVsOnePlayerData.opponentPlayerId;
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void ShieldUpdate(int playerID, int shieldNow)
|
| | | {
|
| | | DebugEx.LogError("输出玩家的ID" + playerID+"输出当前护盾值"+ shieldNow);
|
| | | }
|
| | | private void OnHeroHandupAIStopPassive()
|
| | | {
|
| | | //if (!m_AutoImg.activeSelf)
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, December 28, 2018 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using Snxxz.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | |
| | | //对手信息 |
| | | public class OpponentInformation : Singleton<OpponentInformation>
|
| | | {
|
| | | public int PlayerID { get; private set; } // 玩家ID
|
| | | public int ExAttr4 { get; private set; } // 当前护盾值
|
| | |
|
| | | public event Action<int, int> ShieldUpdate;//玩家ID和护盾刷新
|
| | |
|
| | | public void GetOpponentInformation0418(H0418_tagObjInfoRefresh info)
|
| | | {
|
| | |
|
| | | switch ((PlayerDataRefresh)info.RefreshType)
|
| | | {
|
| | | case PlayerDataRefresh.ExAttr4:
|
| | | this.PlayerID = (int)info.ObjID;
|
| | | this.ExAttr4 = (int)info.Value;
|
| | | if (ShieldUpdate != null)
|
| | | {
|
| | | ShieldUpdate((int)info.ObjID, (int)info.Value);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | | public void GetOpponentInformation0434(H0434_tagAreaPlayerAppearEx info)
|
| | | {
|
| | | this.PlayerID = (int)info.PlayerID;
|
| | | this.ExAttr4 = (int)info.ExAttr4;
|
| | | if (ShieldUpdate != null)
|
| | | {
|
| | | ShieldUpdate((int)info.PlayerID, (int)info.ExAttr4);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b301ee999f03dff4ea3e6550c88b7f2b |
| | | timeCreated: 1545998954 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public bool isPlayerDie { get; private set; }
|
| | |
|
| | | private float delayTime = 2f;
|
| | | private bool isGetNewItem = false;
|
| | | public bool isStartDecompose { get; set; }
|
| | |
| | | private void Awake()
|
| | | {
|
| | | isGetNewItem = false;
|
| | | isPlayerDie = false;
|
| | | delayTime = 2;
|
| | | HeroBehaviour.OnStartHandupAI -= OnStartHandupAI;
|
| | | HeroBehaviour.OnStopHandupAI -= OnStopHandupAI;
|
| | |
| | | if(halfSecondTimer >= 0.5f)
|
| | | {
|
| | | halfSecondTimer = 0f;
|
| | | if (!isPlayerDie)
|
| | | if (!DeadModel.playerIsDie)
|
| | | {
|
| | | bool isCool;
|
| | | KnapsackTimeCDMgr.Instance.GetItemCoolByCDType(1, out isCool);
|
| | |
| | |
|
| | | private void PlayerRebornSuccess()
|
| | | {
|
| | | isPlayerDie = false;
|
| | | StopAllCoroutines();
|
| | | }
|
| | |
|
| | |
| | | /// </summary>
|
| | | private void AutoDrugSetting()
|
| | | {
|
| | | int dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | if (dataMapId == CrossServerOneVsOneModel.CrossServerDataMapId) return;
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1) return;
|
| | |
|
| | | float hpPercent = Mathf.RoundToInt((float)PlayerDatas.Instance.baseData.HP / PlayerDatas.Instance.extersion.MaxHP * 100);
|
| | | if (hpPercent <= HangUpSetModel.Instance.GetHpSet())
|
| | |
| | | private int rebornPrice;
|
| | | private void OnPlayerDie()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<FunctionForecastWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<FunctionForecastWin>();
|
| | | }
|
| | | isPlayerDie = true;
|
| | |
|
| | |
|
| | | if (!_isAutoHangUp || !HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoReborn)
|
| | | || !DeadModel.IsCanReborn || IsDungeon())
|
| | | return;
|
| | |
| | | switch (window.name)
|
| | | {
|
| | | case "RebornWin":
|
| | | if (SettingEffectMgr.Instance.isPlayerDie)
|
| | | if (DeadModel.playerIsDie)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen(openWinlist[i]))
|
| | | {
|
| | |
| | | }
|
| | | break;
|
| | | case "ReliveWin":
|
| | | if (SettingEffectMgr.Instance.isPlayerDie)
|
| | | if (DeadModel.playerIsDie)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen(openWinlist[i]))
|
| | | {
|
| | |
| | | }
|
| | | break;
|
| | | case "ElderGodAreaExitWin":
|
| | | if (SettingEffectMgr.Instance.isPlayerDie)
|
| | | if (DeadModel.playerIsDie)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen(openWinlist[i]))
|
| | | {
|