Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HA40D_tagGCServerCreatFamilyTimes), typeof(DTCA40D_tagGCServerCreatFamilyTimes));
|
| | | Register(typeof(HAC07_tagGCHorsePetBossInfo), typeof(DTCAC07_tagGCHorsePetBossInfo));
|
| | | Register(typeof(HB216_tagMCStartCustomSceneResult), typeof(DTCB216_tagMCStartCustomSceneResult));
|
| | | Register(typeof(HA905_tagGCNotifyEquipDetailInfo), typeof(DTCA905_tagGCNotifyEquipDetailInfo));
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Friday, May 31, 2019 |
| | | // [ Date ]: Monday, June 10, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public readonly int id;
|
| | | public readonly string name;
|
| | | public readonly string category;
|
| | | public readonly int jump;
|
| | | public readonly int guide;
|
| | | public readonly int type;
|
| | |
| | |
|
| | | name = tables[1];
|
| | |
|
| | | int.TryParse(tables[2],out jump); |
| | | category = tables[2];
|
| | |
|
| | | int.TryParse(tables[3],out guide); |
| | | int.TryParse(tables[3],out jump); |
| | |
|
| | | int.TryParse(tables[4],out type); |
| | | int.TryParse(tables[4],out guide); |
| | |
|
| | | int.TryParse(tables[5],out condition); |
| | | int.TryParse(tables[5],out type); |
| | |
|
| | | string[] itemConditionStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | int.TryParse(tables[6],out condition); |
| | |
|
| | | string[] itemConditionStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | itemCondition = new Int2[itemConditionStringArray.Length]; |
| | | for (int i=0;i<itemConditionStringArray.Length;i++) |
| | | { |
| | | Int2.TryParse(itemConditionStringArray[i],out itemCondition[i]); |
| | | }
|
| | |
|
| | | string[] excludeFuncsStringArray = tables[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] excludeFuncsStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | excludeFuncs = new int[excludeFuncsStringArray.Length]; |
| | | for (int i=0;i<excludeFuncsStringArray.Length;i++) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b2d416872ed7b3048a5b2d4696c3541f |
| | | timeCreated: 1559286620 |
| | | timeCreated: 1560146342 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | {
|
| | | if (config.dataType == 1)
|
| | | {
|
| | | return VipPrivilegeConfig.GetVipPrivilegeData(id, level);
|
| | | return VipPrivilegeConfig.GetVipPrivilegeData(config.privilegeId, level);
|
| | | }
|
| | | if (config.datas != null && config.datas.Length > 0)
|
| | | {
|
| | |
| | | private static Dictionary<StoreItem, StoreConfig> s_StoreItemDict = new Dictionary<StoreItem, StoreConfig>();
|
| | | private static Dictionary<int, List<StoreConfig>> storeConfigs = new Dictionary<int, List<StoreConfig>>();
|
| | |
|
| | | static readonly int[] shop1Types = new int[] { 2, 3 };
|
| | | static readonly int[] shop2Types = new int[] { 4 };
|
| | | static readonly int[] shop1Types = new int[] { 1, 2, 3 };
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | if (ShopType == 0) return;
|
| | |
| | | item = _item,
|
| | | type = _moneyType,
|
| | | shopType = shop1Types[i],
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(storeItem))
|
| | | {
|
| | | return s_StoreItemDict[storeItem];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | {
|
| | | for (int i = 0; i < shop2Types.Length; i++)
|
| | | {
|
| | | var storeItem = new StoreItem()
|
| | | {
|
| | | item = _item,
|
| | | type = _moneyType,
|
| | | shopType = shop2Types[i],
|
| | | };
|
| | | if (s_StoreItemDict.ContainsKey(storeItem))
|
| | | {
|
| | |
| | | string _content = string.Format("DTC0608_tagNPCDie => S:{0} 死亡. 死亡原因: {1}, 杀死它的是: {2}", vNetData.ObjID, vNetData.Reason, vNetData.KillerID);
|
| | | RuntimeLogUtility.AddLog_Blue(_content, (uint)vNetData.ObjID);
|
| | | #endif
|
| | | GActor _actor = null;
|
| | | GActorFight _actor = null;
|
| | | if (PersonalEnemy.m_SBindCDict.ContainsKey(vNetData.ObjID))
|
| | | {
|
| | | _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]);
|
| | | _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]) as GActorFight;
|
| | | ClientSceneManager.Instance.lastDeadPos = _actor.Pos;
|
| | | GAMgr.Instance.ServerDie(_actor.ServerInstID);
|
| | | _actor.Die();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | _actor = GAMgr.Instance.GetBySID(vNetData.ObjID);
|
| | | _actor = GAMgr.Instance.GetBySID(vNetData.ObjID) as GActorFight;
|
| | | }
|
| | |
|
| | | if (_actor == null)
|
| | |
| | |
|
| | | _actor.SetAnimatorSpeed(1);
|
| | |
|
| | | if (_actor is GActorNpcNoFight
|
| | | || !_actor.HasState(GAStaticDefine.State_DeadHash))
|
| | | if (!_actor.HasState(GAStaticDefine.State_DeadHash))
|
| | | {
|
| | | GAMgr.Instance.Release(_actor);
|
| | | }
|
| | | else if (_actor is GActorNpcFight
|
| | | || _actor is GA_NpcFightSgzcZZ)
|
| | | {
|
| | | if (_targetFight != null)
|
| | | if (_actor != null)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | | if (_hero != null)
|
| | | {
|
| | | if (_hero.SelectTarget != null && _targetFight.ServerInstID == _hero.SelectTarget.ServerInstID)
|
| | | if (_hero.SelectTarget != null && _actor.ServerInstID == _hero.SelectTarget.ServerInstID)
|
| | | {
|
| | | SelectionManager.Release(SelectionManager.E_Type.Red);
|
| | | }
|
| | |
|
| | | if (_hero.LockTarget == _targetFight)
|
| | | if (_hero.LockTarget == _actor)
|
| | | {
|
| | | _hero.LockTarget = null;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_targetFight.State == E_ActorState.AutoRun)
|
| | | if (_actor.State == E_ActorState.AutoRun)
|
| | | {
|
| | | _targetFight.StopPathFind();
|
| | | _actor.StopPathFind();
|
| | | }
|
| | |
|
| | | _targetFight.ActorInfo.serverDie = true;
|
| | | _targetFight.ReleaseName();
|
| | | _targetFight.ReleaseShadow();
|
| | | _targetFight.SkillMgr.Clear();
|
| | | GAMgr.Instance.DoDelayDie(_targetFight);
|
| | | _actor.ActorInfo.serverDie = true;
|
| | | _actor.ReleaseName();
|
| | | _actor.ReleaseShadow();
|
| | | _actor.SkillMgr.Clear();
|
| | | GAMgr.Instance.DoDelayDie(_actor);
|
| | |
|
| | | GActorFight _killer = GAMgr.Instance.GetBySID(vNetData.KillerID) as GActorFight;
|
| | |
|
| | |
| | |
|
| | | if (_transToMainUser)
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID / 10);
|
| | | _actor.Die(vNetData.KillerID / 10);
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | _content = string.Format("DTC0608_tagNPCDie => {0} 死亡的时候凶手: {1} 已经将招式: {2} 演示完毕, 这里直接死亡.", vNetData.ObjID, vNetData.KillerID, vNetData.Reason);
|
| | | RuntimeLogUtility.AddLog_Red(_content, (uint)vNetData.ObjID);
|
| | | #endif
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | |
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die();
|
| | | _actor.Die();
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, June 10, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | public class DTCA40D_tagGCServerCreatFamilyTimes : DtcBasic {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HA40D_tagGCServerCreatFamilyTimes;
|
| | | ModelCenter.Instance.GetModel<FairyModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b979a9bafc3892f45bf585eb5a5e3a17 |
| | | timeCreated: 1560154228 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A4 0D 通知建盟次数 #tagGCServerCreatFamilyTimes
|
| | |
|
| | | public class HA40D_tagGCServerCreatFamilyTimes : GameNetPackBasic {
|
| | | public uint Times; //建盟次数
|
| | |
|
| | | public HA40D_tagGCServerCreatFamilyTimes () {
|
| | | _cmd = (ushort)0xA40D;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Times, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 07bf433f16e1e2542ae456c04d7c61e2 |
| | | timeCreated: 1560154198 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | if (_target.ActorInfo.RealHp <= _hurtValue && (_clientNpc == null || _clientNpc.lockHp <= 0))
|
| | | {
|
| | | if (_clientNpc.NpcConfig.AIType != 198)
|
| | | if (_clientNpc != null && _clientNpc.NpcConfig.AIType != 198)
|
| | | {
|
| | | _target.KillerServerInstID = m_Hero.ServerInstID;
|
| | | _target.ActorInfo.serverDie = true;
|
| | |
| | | target.KillerPos = attacker.Pos;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | if (canDie
|
| | | && target.ActorInfo.RealHp == 0)
|
| | | && (target.ActorInfo.serverDie || target.ActorInfo.RealHp == 0))
|
| | | {
|
| | | target.Die(attacker.ServerInstID, soConfig.deadFlyId, (byte)attackType);
|
| | | }
|
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "cacheFreePoint", _g_get_cacheFreePoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "maxQuality", _g_get_maxQuality); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "freeResetLevel", _g_get_freeResetLevel); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "resetCostItemId", _g_get_resetCostItemId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "reikiRootGetWays", _g_get_reikiRootGetWays); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "isServerPrepare", _g_get_isServerPrepare); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "displayOpenAnimation", _g_get_displayOpenAnimation); |
| | |
| | | |
| | | Snxxz.UI.ReikiRootModel gen_to_be_invoked = (Snxxz.UI.ReikiRootModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.freeResetLevel); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_resetCostItemId(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.ReikiRootModel gen_to_be_invoked = (Snxxz.UI.ReikiRootModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.resetCostItemId); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | for (var i = newAuctions.Count - 1; i >= 0; i--) |
| | | { |
| | | var oldItem = packModel.GetItemByGuid(newAuctions[i]); |
| | | if (oldItem == null) |
| | | { |
| | | newAuctions.RemoveAt(i); |
| | | } |
| | | } |
| | | |
| | | var item = packModel.GetItemByIndex(type, index); |
| | | if (item == null) |
| | | { |
| | |
| | | const string fileName = "ChatHistory";
|
| | |
|
| | | public static int localSaveCount = 50;
|
| | | public static int localChatKeepHour = 48;
|
| | | public static int localChatKeepHour = 12;
|
| | |
|
| | | static StringBuilder sb = new StringBuilder();
|
| | |
|
| | |
| | | |
| | | private void ShowQuestGroups() |
| | | { |
| | | var quests = model.GetDailyQuests(model.category, true); |
| | | |
| | | var quests = model.GetDailyQuests(model.category, true);
|
| | | var index = quests.IndexOf(model.wannaLookDailyQuest); |
| | | |
| | | var groupDatas = new List<DailyQuestGroup.GroupData>(); |
| | | var max = quests.Count; |
| | | for (int i = 0; i < max; i++, i++) |
| | |
| | | } |
| | | |
| | | m_QuestScroll.Init(groupDatas); |
| | | |
| | | var currentQuestIndex = quests.IndexOf(model.currentDailyQuest); |
| | | if (currentQuestIndex != -1) |
| | | if (index != -1) |
| | | { |
| | | m_QuestScroll.MoveToCenter(currentQuestIndex / 2); |
| | | m_QuestScroll.MoveToCenter(index / 2); |
| | | } |
| | | } |
| | | |
| | |
| | | _dict = new Dictionary<int, StoreConfig>();
|
| | | liquidStoreDict.Add(liquidItems[i], _dict);
|
| | | }
|
| | | for (int k = 0; k < _moneyTypeList.Count; k++)
|
| | | for (int j = 0; j < _shopTypes.Count; j++)
|
| | | {
|
| | | var config = StoreConfig.GetStoreCfg(liquidItems[i], _moneyTypeList[k]);
|
| | | if (config != null && _shopTypes.Contains(config.ShopType))
|
| | | for (int k = 0; k < _moneyTypeList.Count; k++)
|
| | | {
|
| | | _dict.Add(_moneyTypeList[k], config);
|
| | | var config = StoreConfig.GetStoreCfg(liquidItems[i], _moneyTypeList[k], _shopTypes[j]);
|
| | | if (config != null)
|
| | | {
|
| | | if (!_dict.ContainsKey(_moneyTypeList[k]))
|
| | | {
|
| | | _dict.Add(_moneyTypeList[k], config);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | dungeonModel.ChallengeNextDungeonLevel();
|
| | | LatencyTime = 0;
|
| | | }
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | //冰晶矿脉新
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using Snxxz.UI;
|
| | |
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class IceLodeStarAwardClass
|
| | |
| | | DungeonModel m_Model;
|
| | | DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } }
|
| | | public const int ICECRYSTALVEIN_MAPID = 31140;
|
| | | public const int ICECRYSTALVEIN_REDPOINT = 78102;
|
| | | public Redpoint Redpoint = new Redpoint(78001, ICECRYSTALVEIN_REDPOINT);
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | var IceLodeCfg = FuncConfigConfig.Get("IceLodeCfg");
|
| | |
| | |
|
| | | private void dungeonRecordChangeEvent(int fbId)
|
| | | {
|
| | | if (fbId == ICECRYSTALVEIN_MAPID)
|
| | | {
|
| | | IsShowRedPoint();
|
| | | }
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | {
|
| | | model.dungeonRecordChangeEvent += dungeonRecordChangeEvent;
|
| | | AddIceLodeStarAwardList();
|
| | | IsShowRedPoint();
|
| | | }
|
| | |
|
| | | private void Assignment()
|
| | |
| | | HasSweep = (int)info.HasSweep;
|
| | | DayLv = (int)info.DayLV;
|
| | | AddIceLodeStarAwardList();
|
| | | IsShowRedPoint();
|
| | | if (UpdateIceLodeInf != null)
|
| | | {
|
| | | UpdateIceLodeInf();
|
| | |
| | | public bool IsFree(int Index)
|
| | | {
|
| | | DungeonRecord dungeonRecord;
|
| | | if (model.TryGetRecord(31140, out dungeonRecord))
|
| | | if (model.TryGetRecord(ICECRYSTALVEIN_MAPID, out dungeonRecord))
|
| | | {
|
| | | if (dungeonRecord.lineGrades.ContainsKey(Index))
|
| | | {
|
| | |
| | | {
|
| | | IceLodeStarAwardList.Add(Dic);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void IsShowRedPoint()//是否显示红点
|
| | | {
|
| | | bool Isbool = false;
|
| | | for (int i = 0; i < IceLodeStarAwardList.Count; i++)
|
| | | {
|
| | | IceLodeStarAwardClass IceLode = IceLodeStarAwardList[i];
|
| | | int All_star = GetAllStar();
|
| | | bool _bool = MathUtility.GetBitValue((uint)AwardRecord, (ushort)IceLode.Index);
|
| | | if (All_star >= IceLode.Star && !_bool)
|
| | | {
|
| | | Isbool = true;
|
| | | }
|
| | | }
|
| | | if (Isbool)
|
| | | {
|
| | | Redpoint.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | Redpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Text m_Star; |
| | | |
| | | EquipSuitEffect m_EquipSuitEffect; |
| | | EquipSuitEffect equipSuitEffect
|
| | | {
|
| | | get
|
| | | {
|
| | | EquipSuitEffect equipSuitEffect {
|
| | | get {
|
| | | if (m_EquipSuitEffect == null)
|
| | | {
|
| | | m_EquipSuitEffect = EquipSuitEffect.Create(transform as RectTransform);
|
| | |
| | | } |
| | | |
| | | EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } } |
| | | |
| | | int level = 0; |
| | |
| | | this.level = level; |
| | | this.place = place; |
| | | var set = model.GetEquipSet(level); |
| | | if (set == null)
|
| | | {
|
| | | Debug.LogErrorFormat("尝试获得第{0}阶装备的数据出现错误.", this.level);
|
| | | } |
| | | slot = set.GetEquipSlot(place); |
| | | |
| | | DisplayBaseInfo(); |
| | |
| | |
|
| | | public class FairyCreateWin : Window
|
| | | {
|
| | | [SerializeField] Text textCreateLimit1;
|
| | | [SerializeField] Text textCreateLimit2;
|
| | | [SerializeField] Text m_CreateRemind1;
|
| | | [SerializeField] Text m_CreateRemind2;
|
| | | [SerializeField] Button creationClose;
|
| | | [SerializeField] InputField creationInput;
|
| | | [SerializeField] Button creationConfirm;
|
| | |
| | | {
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFariyInfo;
|
| | |
|
| | | textCreateLimit1.text = Language.Get("L1132", model.createFairyLv);
|
| | | textCreateLimit2.text = Language.Get("L1133", model.createFairyCost);
|
| | | m_CreateRemind1.text = Language.Get("L1132", model.createFairyLv);
|
| | | m_CreateRemind2.text = Language.Get("L1133", model.createFairyCost);
|
| | | creationInput.text = string.Empty;
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.diamond >= model.createFairyCost)
|
| | | if (model.fairyCreateTimes < model.createFairyFreeCount)
|
| | | {
|
| | | CA404_tagCGPyCreatFamily creatPack = new CA404_tagCGPyCreatFamily();
|
| | | creatPack.Name = creationInput.text;
|
| | | creatPack.FakeID = 0;
|
| | | GameNetSystem.Instance.SendInfo(creatPack);
|
| | | var pak = new CA404_tagCGPyCreatFamily();
|
| | | pak.Name = creationInput.text;
|
| | | pak.FakeID = 0;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | if (PlayerDatas.Instance.baseData.diamond >= model.createFairyCost)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | var pak = new CA404_tagCGPyCreatFamily();
|
| | | pak.Name = creationInput.text;
|
| | | pak.FakeID = 0;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | CloseImmediately();
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | CloseImmediately();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OnRefreshFariyInfo()
|
| | |
| | | {
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | FairyBossModel fairyBossModel { get { return ModelCenter.Instance.GetModel<FairyBossModel>(); } }
|
| | |
|
| | | public event Action fairyCreateTimesUpdate;
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
| | | ClearAllFairyRequest();
|
| | | m_FairyRequesteds.Clear();
|
| | | m_RequestFairyInfoCount = 0;
|
| | | fairyCreateTimes = 0;
|
| | | completeGuardSky = false;
|
| | | fairyLeagueDugeonCoolDown = false;
|
| | | }
|
| | |
| | | get;
|
| | | private set;
|
| | | }
|
| | | public int createFairyFreeCount
|
| | | {
|
| | | get;
|
| | | private set;
|
| | | }
|
| | | public readonly int changeFairyNameItem = 947;
|
| | | public int freeNotifyCount { get; private set; }
|
| | | public int changeNotifyCost { get; private set; }
|
| | | public int fairyFeastDeskNpc { get; private set; }
|
| | | public int fairyCreateTimes { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | var config = FuncConfigConfig.Get("CreateFamilyMinLV");
|
| | | createFairyLv = int.Parse(config.Numerical1);
|
| | | config = FuncConfigConfig.Get("CreateFamilyNeedMoney");
|
| | | createFairyCost = int.Parse(config.Numerical1);
|
| | | createFairyFreeCount = int.Parse(config.Numerical3);
|
| | | config = FuncConfigConfig.Get("FamilyBroadcast");
|
| | | freeNotifyCount = int.Parse(config.Numerical1);
|
| | | changeNotifyCost = int.Parse(config.Numerical2);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA40D_tagGCServerCreatFamilyTimes package)
|
| | | {
|
| | | fairyCreateTimes = (int)package.Times;
|
| | | if (fairyCreateTimesUpdate != null)
|
| | | {
|
| | | fairyCreateTimesUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public bool FairyRequested(int _fairyId)
|
| | | {
|
| | | return m_FairyRequesteds.Contains(_fairyId);
|
| | |
| | | private int _NumberNumerical = 0;//数量数值
|
| | | private string _content = null;
|
| | |
|
| | | private int minRedpackCount = 10;
|
| | |
|
| | | // private int _Number = 0;//用来获取仙盟的人数
|
| | | private int _RedLines = 0;//红包额度
|
| | | RedPacketModel m_RedPacket;
|
| | |
| | | {
|
| | | if (int.Parse(NumKeyboardNumber.Value) <= (int)PlayerDatas.Instance.fairyData.fairy.MemberCount)
|
| | | {
|
| | | if (!RedBagTipsWin._RedBagTipsWin._RedBool && int.Parse(NumKeyboardNumber.Value) <= 10)
|
| | | if (!RedBagTipsWin._RedBagTipsWin._RedBool && int.Parse(NumKeyboardNumber.Value) <= minRedpackCount)
|
| | | {
|
| | | NumKeyboardNumber.Value = 10.ToString();
|
| | | _NumberNumerical = 10;//仙盟红包至少10包
|
| | | NumKeyboardNumber.Value = minRedpackCount.ToString();
|
| | | _NumberNumerical = minRedpackCount;//仙盟红包至少10包
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | if (!RedBagTipsWin._RedBagTipsWin._RedBool)
|
| | | {
|
| | | if (PlayerDatas.Instance.fairyData.fairy.MemberCount <= 10)
|
| | | if (PlayerDatas.Instance.fairyData.fairy.MemberCount <= minRedpackCount)
|
| | | {
|
| | | NumKeyboardNumber.Value = 10.ToString();
|
| | | NumKeyboardNumber.Value = minRedpackCount.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var getWay = redPacket._DicRedBag[redPacket.RedBagId].GetWay;
|
| | | var configs = RedPackConfig.GetValues();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | if (config.RedEnvelopeType == getWay)
|
| | | {
|
| | | minRedpackCount = config.PacketCnt;
|
| | | }
|
| | | }
|
| | |
|
| | | _BonusAmount = redPacket._DicRedBag[redPacket.RedBagId].MoneyNum;
|
| | | _DotText1.text = _BonusAmount.ToString();
|
| | | _CountText.text = _BonusAmount.ToString();
|
| | | if ((int)PlayerDatas.Instance.fairyData.fairy.MemberCount <= 10)
|
| | | if ((int)PlayerDatas.Instance.fairyData.fairy.MemberCount <= minRedpackCount)
|
| | | {
|
| | | _NumberNumerical = 10;//仙盟红包至少10包
|
| | | _NumberNumerical = minRedpackCount;//仙盟红包至少10包
|
| | | _DotText2.text = _NumberNumerical.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | _NumberNumerical = 10;
|
| | | _NumberNumerical = minRedpackCount;
|
| | | _DotText2.text = _NumberNumerical.ToString();
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (_NumberNumerical <= 10)
|
| | | if (_NumberNumerical <= minRedpackCount)
|
| | | return;
|
| | | _NumberNumerical -= 1;
|
| | | _DotText2.text = _NumberNumerical.ToString();
|
| | |
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Close<BossHomeVipLackWin>();
|
| | | WindowCenter.Instance.Open<VipRechargeWin>(false,1);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc2);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | | HazyGrassModel hazyGrassModel { get { return ModelCenter.Instance.GetModel<HazyGrassModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | Display();
|
| | |
|
| | | hazyGrassModel.onMapNpcCountRefresh += OnMapNpcCountRefresh;
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.MapID == HazyGrassModel.FAIRY_CLIENTDATAMAP
|
| | | || PlayerDatas.Instance.baseData.MapID == HazyGrassModel.FAIRY_DATAMAP)
|
| | | {
|
| | | packModel.refreshItemCountEvent += RefreshItemCountEvent;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | hazyGrassModel.onMapNpcCountRefresh -= OnMapNpcCountRefresh;
|
| | | packModel.refreshItemCountEvent -= RefreshItemCountEvent;
|
| | | }
|
| | |
|
| | | private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
|
| | | {
|
| | | if (packType == PackType.Item)
|
| | | {
|
| | | var mapId = 0;
|
| | | if (ClientDungeonStageUtility.isClientDungeon)
|
| | | {
|
| | | var incidentId = hazyRegionModel.GetIncidentId(ClientDungeonStageUtility.dungeonInfo.mapId, ClientDungeonStageUtility.dungeonInfo.lineId);
|
| | | mapId = hazyGrassModel.GetGrassMapId(incidentId);
|
| | | }
|
| | | else
|
| | | {
|
| | | mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | }
|
| | | var npcInfos = hazyGrassModel.GetGrassNpcInfos(mapId);
|
| | | for (int i = 0; i < npcInfos.Count; i++)
|
| | | {
|
| | | var _itemId = hazyGrassModel.GetGrassNpcItemId(npcInfos[i]);
|
| | | if (_itemId == itemId)
|
| | | {
|
| | | DisplayGrassCount();
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | [SerializeField] Transform m_Container;
|
| | | [SerializeField] Text m_Title;
|
| | | [SerializeField] Text m_Count;
|
| | | [SerializeField] Transform m_ContainerItem;
|
| | | [SerializeField] Text m_ItemCount;
|
| | |
|
| | | HazyGrassModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<HazyGrassModel>(); }
|
| | | }
|
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | public void Display(int npcId, int count)
|
| | | {
|
| | |
| | | m_Title.text = Language.Get("HazyGrassCountTitle", npcConfig.charName);
|
| | | m_Count.text = count.ToString();
|
| | | m_Count.color = UIHelper.GetUIColor(count > 0 ? TextColType.Green : TextColType.Red);
|
| | |
|
| | | m_ContainerItem.gameObject.SetActive(PlayerDatas.Instance.baseData.MapID == HazyGrassModel.FAIRY_CLIENTDATAMAP
|
| | | || PlayerDatas.Instance.baseData.MapID == HazyGrassModel.FAIRY_DATAMAP);
|
| | |
|
| | | if (m_ContainerItem.gameObject.activeSelf)
|
| | | {
|
| | | var itemId = model.GetGrassNpcItemId(npcId);
|
| | | var itemCount = packModel.GetItemCountByID(PackType.Item, itemId);
|
| | | m_ItemCount.text = itemCount.ToString();
|
| | | m_ItemCount.color = UIHelper.GetUIColor(itemCount > 0 ? TextColType.Green : TextColType.Red);
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetActive(bool active)
|
| | |
| | | public class HazyGrassModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, int> m_MapNpcCount = new Dictionary<int, int>();
|
| | | Dictionary<int, int> m_NpcMapItems;
|
| | |
|
| | | public const int REIKI_DATAMAP = 32040;
|
| | | public const int FAIRY_DATAMAP = 32050;
|
| | |
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("HazyGrassNpcMapItem");
|
| | | m_NpcMapItems = ConfigParse.GetDic<int, int>(funcConfig.Numerical1);
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetGrassNpcItemId(int npcId)
|
| | | {
|
| | | if (m_NpcMapItems.ContainsKey(npcId))
|
| | | {
|
| | | return m_NpcMapItems[npcId];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public string GetLocalSaveKey(int mapId)
|
| | | {
|
| | | return StringUtility.Contact("HazyGrassMap", mapId, "_", PlayerDatas.Instance.PlayerId);
|
| | |
| | | [SerializeField] Text m_ItemName;
|
| | | [SerializeField] Button m_Close;
|
| | | [SerializeField] Button m_Use;
|
| | | [SerializeField] Text m_Title;
|
| | | [SerializeField] Button m_ViewItemDetail;
|
| | | [SerializeField] float delayShowTime = 2f;
|
| | |
|
| | |
| | | switch ((ItemType)item.config.Type)
|
| | | {
|
| | | case ItemType.WingsMat:
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(item.itemId, out jumpId);
|
| | | var jumpId = 0;
|
| | | var isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(item.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | ItemOperateUtility.Instance.GotoComposeItem(jumpId);
|
| | |
| | | {
|
| | | if (_item != null)
|
| | | {
|
| | | m_Title.text = GeneralDefine.onlyUsedAtBackpackItems.Contains(_item.itemId) ? "查看" : "使用";
|
| | | var itemConfig = ItemConfig.Get(_item.itemId);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | m_ItemName.color = UIHelper.GetUIColor(itemConfig.ItemColor, true);
|
| | |
| | | else
|
| | | {
|
| | | _BuffBtn.gameObject.SetActive(true);
|
| | | _BuffNumber.text = Count.ToString();
|
| | | _BuffNumber.text = StringUtility.Contact("Buff x", Count);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Friday, September 08, 2017
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | //顶层面板框按钮
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class HighSettingTip : MonoBehaviour
|
| | | {
|
| | |
|
| | | [SerializeField] Button _DaTreasureBtn;//打宝按钮
|
| | | [SerializeField] Button m_LootPrecious;//夺宝
|
| | | [SerializeField] Button _MarketBtn;//市场按钮
|
| | |
| | |
|
| | | void MarketButton()//市场按钮
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<AuctionHouseWin>();
|
| | | }
|
| | |
|
| | | void OpenService()//开服活动
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<OpenServerActivityWin>();
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (FuncOpen.Instance.IsFuncOpen(79))
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<StoreWin>();
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | void WelfareButton()//福利按钮
|
| | | {
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WelfareCenter.Instance.OpenWelfare();
|
| | | }
|
| | |
|
| | | void DaTreasureButton()//打宝按钮
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | |
|
| | | if (NewBieCenter.Instance.inGuiding
|
| | | && NewBieCenter.Instance.currentGuide == 111)
|
| | | {
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | void LootPreciousButton()//夺宝
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1);
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | switch (m_RechargetBtnBehaviour.state)
|
| | | {
|
| | | case 1:
|
| | | if (!NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<FirstRechargeWin>(true);
|
| | | }
|
| | | break;
|
| | | case 3:
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<VipRechargeWin>(false, 0);
|
| | | break;
|
| | | }
|
| | |
| | |
|
| | | void RuneTaButton()//符印塔
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<TowerWin>(false, 0);
|
| | | }
|
| | |
|
| | | void OnClickHappyXBBtn()//寻宝
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<HappyXBWin>();
|
| | | }
|
| | |
|
| | | void OnClickFindHostBtn()//仙宝寻主
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<TreasureFindHostWin>();
|
| | | }
|
| | |
|
| | | void OnClickElfFestivalBtn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<FairylandCeremonyWin>();
|
| | | }
|
| | |
|
| | | void OnClickCrossServerBtn()//跨服PK
|
| | | {
|
| | | int limitlv = FuncOpenLVConfig.Get(157).LimitLV;
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | if (FuncOpen.Instance.IsFuncOpen(157) && TimeUtility.OpenDay >= crossServerModel.afterOpenDayOpenCross)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<CrossServerWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<CrossServerWin>();
|
| | | //if (PlayerDatas.Instance.baseData.LV < limitlv)
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("CrossMatching14", limitlv);
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("CrossMatching15", crossServerModel.afterOpenDayOpenCross);
|
| | | //}
|
| | | }
|
| | | }
|
| | |
|
| | | private void OpenHazyRegion()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<HazyRegionFrameWin>();
|
| | | }
|
| | |
|
| | | void OnClickOpenServiceBtn()
|
| | | {
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<AchievementActivityWin>();
|
| | | }
|
| | |
|
| | | void OnClickNewYearBtn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | WindowCenter.Instance.Open<NewYearFairylandCeremonyWin>();
|
| | | }
|
| | |
|
| | | private void RefreshOSCEffect()
|
| | | {
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | var _open = ModelCenter.Instance.GetModel<ImpactRankModel>().OSCEffectOpen;
|
| | | if (_open && !m_OSCEffect.IsPlaying)
|
| | | {
|
| | |
| | |
|
| | | private void OnStoreFuncOpen()
|
| | | {
|
| | | HighSettingFadeInFadeOut.SetAutoCloseTimer();
|
| | | RefreshStoreEffect();
|
| | | }
|
| | |
|
| | |
| | | _Synthesis1Btn.onClick.AddListener(Synthesis1Button);
|
| | | _Rune1Btn.onClick.AddListener(Rune1Button);
|
| | | _Pet1Btn.onClick.AddListener(Pet1Button);
|
| | | //_RealmBtn.onClick.AddListener(OnRealmButton);
|
| | | _SetUp1Btn.onClick.AddListener(SetUp1Btn);
|
| | | _RankingListBtn.onClick.AddListener(RankingListButton);
|
| | | m_BagualuBtn.AddListener(OnClickBagualuBtn);
|
| | |
| | |
|
| | | void Role1Button()
|
| | | {
|
| | |
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | ModelCenter.Instance.GetModel<RoleModel>().OpenRolePanel();
|
| | |
|
| | | }
|
| | |
|
| | | void OnClickBagualuBtn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<AlchemyBaseWin>();
|
| | | }
|
| | |
|
| | | void SkillButton()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | |
|
| | | var skillModel = ModelCenter.Instance.GetModel<SkillModel>();
|
| | | var treasureSkillModel = ModelCenter.Instance.GetModel<TreasureSkillModel>();
|
| | |
| | |
|
| | | void OpenTreasure()
|
| | | {
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | |
|
| | | if (!treasureModel.SatisfyEntranceOpen())
|
| | | {
|
| | | treasureModel.DisplayEntranceLimitHint();
|
| | | return;
|
| | | }
|
| | |
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | if (treasureModel.IsRequireUnlockAnim(TreasureCategory.Human) != 0)
|
| | | {
|
| | | treasureModel.currentCategory = TreasureCategory.Human;
|
| | |
| | |
|
| | | private void GodBeastBtn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<DogzWin>();
|
| | | }
|
| | |
|
| | | void Strengthen1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<EquipFrameWin>(false, EquipFrameWin.GetRedpointFunction());
|
| | | }
|
| | |
|
| | | void OpenEquip()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<RealmEquipWin>();
|
| | | }
|
| | |
|
| | | void Asuram1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | ModelCenter.Instance.GetModel<FairyModel>().GotoFairyWin();
|
| | | }
|
| | |
|
| | | void Synthesis1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<ComposeWin>();
|
| | | }
|
| | |
|
| | | void Rune1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<RunePanel>();
|
| | | }
|
| | |
|
| | | void Pet1Button()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<PetWin>();
|
| | | }
|
| | |
|
| | | void SetUp1Btn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<SettingUpWin>();
|
| | | //DesignDebug.Log("设置按钮");
|
| | | }
|
| | |
|
| | | void RankingListButton()//排行榜
|
| | | {
|
| | | MainPositionTween.SetRecoverToSkillTimer();
|
| | | WindowCenter.Instance.Open<RankFrameWin>();
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | }
|
| | |
|
| | |
|
| | |
| | | m_MainPositionTween.SwitchFunctions(new MainPositionTween.SwitchParam()
|
| | | {
|
| | | showDefault = !MainPositionTween.isDefaultState,
|
| | | immediately = false
|
| | | immediately = false,
|
| | | manual = true,
|
| | | }
|
| | | );
|
| | | }
|
| | |
| | | public static bool isDefaultState { get; private set; }
|
| | | public static event Action<bool> switchFunctionStateEvent;
|
| | |
|
| | | float resetToDefaultTimer = 0;
|
| | | static float resetToDefaultTimer = 0;
|
| | | public static void SetRecoverToSkillTimer()
|
| | | {
|
| | | resetToDefaultTimer = 20f;
|
| | | }
|
| | |
|
| | | public void SwitchFunctions(SwitchParam switchParams)
|
| | | {
|
| | | if (switchParams.manual && switchParams.showDefault)
|
| | | {
|
| | | resetToDefaultTimer = 0f;
|
| | | }
|
| | | ProcessSwitch(switchParams);
|
| | | } |
| | | |
| | |
| | | break;
|
| | | }
|
| | |
|
| | | var rightBottomState = switchParams.showDefault && !isGuiding && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function;
|
| | | var rightBottomState = resetToDefaultTimer <= 0f
|
| | | && switchParams.showDefault
|
| | | && !isGuiding
|
| | | && !treasureModel.newGotShowing ? RightBottomState.Skill : RightBottomState.Function;
|
| | |
|
| | | switch (rightBottomState)
|
| | | {
|
| | | case RightBottomState.Function:
|
| | |
| | | }
|
| | |
|
| | | isDefaultState = rightBottomState == RightBottomState.Skill;
|
| | | resetToDefaultTimer = !isDefaultState ? 7f : 0f;
|
| | | resetToDefaultTimer = !isDefaultState ? 20f : 0f;
|
| | | m_RayMask.gameObject.SetActive(!isDefaultState);
|
| | |
|
| | | if (switchParams.immediately)
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | SwitchFunctions(new SwitchParam()
|
| | | {
|
| | | immediately = false,
|
| | | showDefault = true,
|
| | | });
|
| | | resetToDefaultTimer = 0.0001f;
|
| | | } |
| | | |
| | | private void OnSwitchAccount()
|
| | |
| | | {
|
| | | public bool showDefault;
|
| | | public bool immediately;
|
| | | public bool manual;
|
| | | } |
| | | |
| | | } |
| | |
| | | public class TaskFeedbackFuncWin : Window
|
| | | {
|
| | | [SerializeField] RectTransform m_Container;
|
| | | [SerializeField] Text m_Category;
|
| | | [SerializeField] TaskFeedbackFunc[] m_Funcs;
|
| | |
|
| | | public static event Action<int> onSelectTask;
|
| | |
| | | if (config != null)
|
| | | {
|
| | | m_Funcs[i].label.text = config.name;
|
| | |
|
| | | if (i == 0)
|
| | | {
|
| | | m_Category.text = config.category;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | |
| | | State state = State.Closed; |
| | | |
| | | float closeTimer = 0f; |
| | | static float closeTimer = 0f; |
| | | int openedFunctionCount = 0; |
| | | |
| | | TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } } |
| | | LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } } |
| | | ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } } |
| | | OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } |
| | | |
| | | public static void SetAutoCloseTimer() |
| | | { |
| | | closeTimer = 20f; |
| | | } |
| | | |
| | | void Start() |
| | | { |
| | |
| | | DisplayArrow(state); |
| | | if (state == State.Opened) |
| | | { |
| | | closeTimer = GeneralDefine.mainWinTopCloseTime; |
| | | SetAutoCloseTimer(); |
| | | } |
| | | } |
| | | |
| | |
| | | DisplayArrow(state); |
| | | if (state == State.Opened) |
| | | { |
| | | closeTimer = GeneralDefine.mainWinTopCloseTime; |
| | | SetAutoCloseTimer(); |
| | | } |
| | | } |
| | | |
| | |
| | |
|
| | | public int freeResetLevel { get; private set; }
|
| | |
|
| | | public int resetCostItemId { get; private set; }
|
| | | public int[] resetCostItemIds { get; private set; }
|
| | |
|
| | | public int[] reikiRootGetWays { get; private set; }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | freeResetLevel = int.Parse(funcConfig.Numerical4);
|
| | | resetCostItemId = int.Parse(funcConfig.Numerical5);
|
| | | resetCostItemIds = LitJson.JsonMapper.ToObject<int[]>(funcConfig.Numerical5);
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("LimitAddPoint");
|
| | | json = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
|
| | |
| | | return m_ReikiQualityMapColors.ContainsKey(quality) ? m_ReikiQualityMapColors[quality] : 1;
|
| | | }
|
| | |
|
| | | public int GetUnLimitTimeResetItem()
|
| | | {
|
| | | var itemId = resetCostItemIds[0];
|
| | | for (int i = 0; i < resetCostItemIds.Length; i++)
|
| | | {
|
| | | var config = ItemConfig.Get(resetCostItemIds[i]);
|
| | | if (config.ExpireTime == 0)
|
| | | {
|
| | | return resetCostItemIds[i];
|
| | | }
|
| | | }
|
| | | return itemId;
|
| | | }
|
| | |
|
| | | public bool IsQualityProperty(int id, int property)
|
| | | {
|
| | | var propertys = GetReikiQualityProperties(id);
|
| | |
| | |
|
| | | if (!freeReset)
|
| | | {
|
| | | m_Item.SetItem(model.resetCostItemId, 1);
|
| | | var count = 0;
|
| | | for (int i = 0; i < model.resetCostItemIds.Length; i++)
|
| | | {
|
| | | var items = packModel.GetItemsById(PackType.Item, model.resetCostItemIds[i]);
|
| | | if (items != null)
|
| | | {
|
| | | foreach (var item in items)
|
| | | {
|
| | | if (!ItemLogicUtility.Instance.IsOverdue(item.guid))
|
| | | {
|
| | | count++;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | m_Item.SetItem(model.GetUnLimitTimeResetItem(), 1);
|
| | | m_Item.count.text = StringUtility.Contact(count >= 1 ? "<color=#35e112>" : "<color=#ff0303>", count,
|
| | | "</color><color=#f7f7f7>/", 1, "</color>");
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var count = packModel.GetItemCountByID(PackType.Item, model.resetCostItemId);
|
| | | var count = 0;
|
| | | for (int i = 0; i < model.resetCostItemIds.Length; i++)
|
| | | {
|
| | | var items = packModel.GetItemsById(PackType.Item, model.resetCostItemIds[i]);
|
| | | if (items != null)
|
| | | {
|
| | | foreach (var item in items)
|
| | | {
|
| | | if (!ItemLogicUtility.Instance.IsOverdue(item.guid))
|
| | | {
|
| | | count++;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (count < 1)
|
| | | {
|
| | | ItemTipUtility.Show(model.resetCostItemId);
|
| | | ItemTipUtility.Show(model.GetUnLimitTimeResetItem());
|
| | | return;
|
| | | }
|
| | | SetResetFlag();
|
| | |
| | | {
|
| | | functionOrder = 4;
|
| | | }
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<RolePanel>(false, functionOrder);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case 6:
|
| | | var isEmptyLabel = label.Equals("Null");
|
| | | m_NullSymbol.gameObject.SetActive(isEmptyLabel);
|
| | | m_Description.gameObject.SetActive(!isEmptyLabel);
|
| | | if (!isEmptyLabel)
|
| | | {
|
| | | m_Description.text = label;
|
| | | }
|
| | | break;
|
| | | case 1:
|
| | | default:
|
| | | m_Symbol.gameObject.SetActive(value > 0);
|
| | |
| | | public class ScrollRectGroup : MonoBehaviour, IInitializePotentialDragHandler, IBeginDragHandler, IEndDragHandler, IDragHandler
|
| | | {
|
| | | [SerializeField] ScrollRect[] m_ScrollRects;
|
| | | [SerializeField] Direction m_OnlyDirection;
|
| | | [SerializeField] float m_Offset = 100f;
|
| | |
|
| | | Dictionary<Direction, ScrollRect> scrollRects = new Dictionary<Direction, ScrollRect>();
|
| | |
| | | var position = eventData.position;
|
| | | if (direction == Direction.Both)
|
| | | {
|
| | | var horizontal = Mathf.Abs(position.x - m_StartPosition.x) > m_Offset;
|
| | | var vertical = !horizontal && Mathf.Abs(position.y - m_StartPosition.y) > m_Offset;
|
| | | if (horizontal || vertical)
|
| | | if (m_OnlyDirection == Direction.Both)
|
| | | {
|
| | | var _direction = horizontal ? Direction.Horizontal : Direction.Vertical;
|
| | | if (_direction != direction)
|
| | | var horizontal = Mathf.Abs(position.x - m_StartPosition.x) > m_Offset;
|
| | | var vertical = !horizontal && Mathf.Abs(position.y - m_StartPosition.y) > m_Offset;
|
| | | if (horizontal || vertical)
|
| | | {
|
| | | direction = _direction;
|
| | | foreach (var scrollRect in m_ScrollRects)
|
| | | var _direction = horizontal ? Direction.Horizontal : Direction.Vertical;
|
| | | if (_direction != direction)
|
| | | {
|
| | | scrollRect.OnBeginDrag(eventData);
|
| | | direction = _direction;
|
| | | foreach (var scrollRect in m_ScrollRects)
|
| | | {
|
| | | scrollRect.OnBeginDrag(eventData);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | direction = m_OnlyDirection;
|
| | | }
|
| | | }
|
| | |
|
| | | if (direction != Direction.Both)
|