Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | System.Type type = typeof(Snxxz.UI.CrossServerOneVsOneModel); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 28, 21, 10); |
| | | Utils.BeginObjectRegister(type, L, translator, 0, 28, 20, 9); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize); |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "afterOpenDayOpenCross", _g_get_afterOpenDayOpenCross); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "pkResultInfo", _g_get_pkResultInfo); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "LocalSaveThirdTypeKey", _g_get_LocalSaveThirdTypeKey); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "crossServerRedpoint", _g_get_crossServerRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "crossOneVsOneRedpoint", _g_get_crossOneVsOneRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "crossArenaRedpoint", _g_get_crossArenaRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "crossDayAwardsRedpoint", _g_get_crossDayAwardsRedpoint); |
| | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "IsMatching", _s_set_IsMatching); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "matchStartTime", _s_set_matchStartTime); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "LocalSaveThirdTypeKey", _s_set_LocalSaveThirdTypeKey); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "crossServerRedpoint", _s_set_crossServerRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "crossOneVsOneRedpoint", _s_set_crossOneVsOneRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "crossArenaRedpoint", _s_set_crossArenaRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "crossDayAwardsRedpoint", _s_set_crossDayAwardsRedpoint); |
| | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | | null, null, null); |
| | | |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 8, 0, 0); |
| | | Utils.BeginClassRegister(type, L, __CreateInstance, 7, 0, 0); |
| | | |
| | | |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossServerDataMapId", Snxxz.UI.CrossServerOneVsOneModel.CrossServerDataMapId); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossServerRedKey", Snxxz.UI.CrossServerOneVsOneModel.CrossServerRedKey); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossOneVsOneRedKey", Snxxz.UI.CrossServerOneVsOneModel.CrossOneVsOneRedKey); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossArenaRedKey", Snxxz.UI.CrossServerOneVsOneModel.CrossArenaRedKey); |
| | | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "CrossDayAwardsRedKey", Snxxz.UI.CrossServerOneVsOneModel.CrossDayAwardsRedKey); |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_crossServerRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.CrossServerOneVsOneModel gen_to_be_invoked = (Snxxz.UI.CrossServerOneVsOneModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.crossServerRedpoint); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_crossOneVsOneRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.CrossServerOneVsOneModel gen_to_be_invoked = (Snxxz.UI.CrossServerOneVsOneModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.LocalSaveThirdTypeKey = LuaAPI.lua_tostring(L, 2); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_crossServerRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.CrossServerOneVsOneModel gen_to_be_invoked = (Snxxz.UI.CrossServerOneVsOneModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.crossServerRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 287f2992ccb8c74419cbb26d17d3d040 |
| | | timeCreated: 1547610180 |
| | | timeCreated: 1547618230 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 11479d6613f53454b9f092ed34c058f8 |
| | | timeCreated: 1547610179 |
| | | timeCreated: 1547618230 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | return PlayerDatas.Instance.baseData.CrossServerFlag > 2; |
| | | } |
| | | |
| | | public const int CrossServerRedKey = 213; |
| | | static Redpoint crossServerRedpoint = new Redpoint(CrossServerRedKey); |
| | | |
| | | public static void UpdateCrossServerRedpoint() |
| | | { |
| | | var oneVsOneCount = CrossServerOneVsOnePKSeason.Instance.isSatisfyMatch |
| | | ? CrossServerOneVsOnePlayerInfo.Instance.GetDayRemainNum() : 0; |
| | | var crossServerBossCount = GeneralDefine.bossWearyValues[2] |
| | | - ModelCenter.Instance.GetModel<CrossServerBossModel>().wearyValue; |
| | | |
| | | var count = oneVsOneCount + crossServerBossCount; |
| | | if (count > 0) |
| | | { |
| | | crossServerRedpoint.count = count; |
| | | crossServerRedpoint.state = RedPointState.Quantity; |
| | | } |
| | | else |
| | | { |
| | | crossServerRedpoint.count = 0; |
| | | crossServerRedpoint.state = RedPointState.None; |
| | | } |
| | | } |
| | | |
| | | public static bool IsCrossServerOneVsOne() |
| | | { |
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | |
| | | return PlayerDatas.Instance.baseData.CrossServerFlag > 2 |
| | | && PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID; |
| | | } |
| | | |
| | | } |
| | |
| | | #endregion
|
| | |
|
| | | #region 红点
|
| | | public const int CrossServerRedKey = 213;
|
| | | public Redpoint crossServerRedpoint = new Redpoint(CrossServerRedKey);
|
| | |
|
| | | public const int CrossOneVsOneRedKey = 21301;
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossServerRedKey,CrossOneVsOneRedKey);
|
| | | public Redpoint crossOneVsOneRedpoint = new Redpoint(CrossServerUtility.CrossServerRedKey,CrossOneVsOneRedKey);
|
| | | public const int CrossArenaRedKey = 2130101;
|
| | | public Redpoint crossArenaRedpoint = new Redpoint(CrossOneVsOneRedKey, CrossArenaRedKey);
|
| | | public const int CrossDayAwardsRedKey = 21301011;
|
| | | public Redpoint crossDayAwardsRedpoint = new Redpoint(CrossArenaRedKey,CrossDayAwardsRedKey);
|
| | | public const int CrossMatchRedKey = 21301012;
|
| | | public Redpoint crossMatchRedpoint = new Redpoint(CrossArenaRedKey, CrossMatchRedKey);
|
| | |
|
| | | public void UpdateCrossDayAwardsRedpoint()
|
| | | {
|
| | | bool isReceive = false;
|
| | |
| | | var playerInfo = CrossServerOneVsOnePlayerInfo.Instance;
|
| | | var pkSeason = CrossServerOneVsOnePKSeason.Instance;
|
| | |
|
| | | if (pkSeason.isSatisfyMatch
|
| | | && playerInfo.GetDayRemainNum() > 0)
|
| | | if (pkSeason.isSatisfyMatch&& playerInfo.GetDayRemainNum() > 0 )
|
| | | {
|
| | | crossMatchRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | |
| | |
|
| | | if (crossMatchRedpoint.state != RedPointState.None)
|
| | | {
|
| | | crossServerRedpoint.count = playerInfo.GetDayRemainNum();
|
| | | crossServerRedpoint.state = RedPointState.Quantity;
|
| | | }
|
| | | else
|
| | | {
|
| | | crossServerRedpoint.count = 0;
|
| | | CrossServerUtility.UpdateCrossServerRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class DogzDungeonModel : Model, IPlayerLoginOk |
| | | public class DogzDungeonModel : Model, IPlayerLoginOk |
| | | { |
| | | |
| | | public const int DOGZDUNGEON_REDPOINT = 77002; |
| | |
| | | { |
| | | m_WearyValue = value; |
| | | UpdateRedpoint(); |
| | | crossServerBossModel.UpdateRedpoint(); |
| | | if (bossWearyValueChangeEvent != null) |
| | | { |
| | | bossWearyValueChangeEvent(); |
| | |
| | | public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DOGZDUNGEON_REDPOINT); |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public int bigBoxNpcId = 0; |
| | | public int smallBoxNpcId = 0; |
| | |
| | |
|
| | | private void SelectTypeRefresh()
|
| | | {
|
| | | for (int i = 0; i <= 2; i++)
|
| | | List<int> list;
|
| | | if (!model.TryGetFashionDresses(model.selectType, model.selectQuality, out list)
|
| | | || list.Count == 0)
|
| | | {
|
| | | List<int> list;
|
| | | if (model.TryGetFashionDresses(model.selectType, i, out list)
|
| | | && list.Count > 0)
|
| | | for (int i = 0; i <= 2; i++)
|
| | | {
|
| | | model.selectQuality = i;
|
| | | break;
|
| | | if (model.TryGetFashionDresses(model.selectType, i, out list)
|
| | | && list.Count > 0)
|
| | | {
|
| | | model.selectQuality = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | DisplayFashionDress();
|
| | |
| | | Color32 redColor = new Color32(255,1,1,255);
|
| | | private void RefreshKillOtherPlayer(uint id, string name)
|
| | | {
|
| | | if (id == PlayerDatas.Instance.baseData.PlayerID || IsDungeon()) return;
|
| | | if (id == PlayerDatas.Instance.baseData.PlayerID || IsDungeon() || CrossServerUtility.IsCrossServer()) return;
|
| | |
|
| | | MapConfig mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | string msg = StringUtility.Contact(Language.Get("KillOthersDes", mapConfig.Name,StringUtility.Contact("<color=#FF0101FF>", UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), "</color>")),ChatCtrl.KILL_IDENTIFY);
|
| | | SendChatInfoToPlayer((int)id,name,0,msg);
|
| | |
| | | {
|
| | | case LoginAdCondition.MoneyInvest:
|
| | | int InvestmentGrade = moneyInvestModel.GetInvestmentGrade();
|
| | | if (InvestmentGrade > 0)
|
| | | if (InvestmentGrade > 0 || PlayerDatas.Instance.baseData.LV >= 500)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
| | | if (ReplaceDic.ContainsKey(retainTaskID))
|
| | | {
|
| | | AutomaticTripToTask(retainTaskID);
|
| | | int missionState = SideQuestState(retainTaskID);
|
| | | TaskTerminationToHangUp(retainTaskID, missionState);
|
| | | //int missionState = SideQuestState(retainTaskID);
|
| | | //TaskTerminationToHangUp(retainTaskID, missionState);
|
| | | retainTaskID = 0;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | SetLength();
|
| | |
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | if (i >= Content.childCount)
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | //var inDungeon = IsDungeon();
|
| | | //TaskScheduling();
|
| | | //if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
|
| | | //{
|
| | | // if (MissionState != 0 && MissionID != 1 && _list.Contains(MissionID))
|
| | | // {
|
| | | // Selected();//选中逻辑
|
| | | // TaskAddAndDelete(MissionID);
|
| | | // if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing)
|
| | | // {
|
| | | // return;
|
| | | // }
|
| | | // TaskJump(MissionID);
|
| | | // return;
|
| | | // }
|
| | |
|
| | | //}
|
| | | if (Parent.gameObject.activeInHierarchy)
|
| | | {
|
| | | StartCoroutine(WaitAddTask(MissionID, MissionState));
|
| | |
| | | return;
|
| | | }
|
| | | TaskScheduling();
|
| | | bool _isBool = false;
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | if (taskmodel.SideQuestState(_list[i]) == 2)
|
| | | {
|
| | | _isBool = true;
|
| | | }
|
| | | }
|
| | | if (_isBool)
|
| | | {
|
| | | TheTaskToGenerate();
|
| | | return;
|
| | | }
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | if (i <= Content.childCount - 1)
|
| | |
| | | [SerializeField] RectTransform m_ContainerLock;
|
| | | [SerializeField] Text m_Condition;
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] UIEffect m_Effect;
|
| | |
|
| | | int horseId = 0;
|
| | | int skillId = 0;
|
| | |
| | | }
|
| | | m_SkillBtn.RemoveAllListeners();
|
| | | m_SkillBtn.AddListener(OnClickSkill);
|
| | |
|
| | | m_Effect.StopImediatly();
|
| | | var model = ModelCenter.Instance.GetModel<PlayerMountDatas>();
|
| | | if (model.ListEffectSkill != null
|
| | | && model.ListEffectSkill.Contains(_skillId))
|
| | | {
|
| | | m_Effect.Play();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickSkill()
|
| | |
| | | [SerializeField] RectTransform m_ContainerLock;
|
| | | [SerializeField] Text m_Condition;
|
| | | [SerializeField] Image m_SkillIcon;
|
| | | [SerializeField] UIEffect m_Effect;
|
| | |
|
| | | int petId = 0;
|
| | | int skillId = 0;
|
| | |
| | | }
|
| | | m_SkillBtn.RemoveAllListeners();
|
| | | m_SkillBtn.AddListener(OnClickSkill);
|
| | |
|
| | | m_Effect.StopImediatly();
|
| | | var model = ModelCenter.Instance.GetModel<PlayerPetDatas>();
|
| | | if (model.ListEffectSkill != null
|
| | | && model.ListEffectSkill.Contains(_skillId))
|
| | | {
|
| | | m_Effect.Play();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickSkill()
|