Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | // C0 02 查看跨服玩家信息 #tagCGViewCrossPlayerInfo
|
| | |
|
| | | public class CC002_tagCGViewCrossPlayerInfo : GameNetPackBasic {
|
| | | public uint PlayerID; // 跨服玩家ID
|
| | | public uint PlayerID; // 跨服玩家ID
|
| | | public byte EquipClassLV; //大于0为查看指定境界阶装备信息,0为查看默认信息
|
| | |
|
| | | public CC002_tagCGViewCrossPlayerInfo () {
|
| | | combineCmd = (ushort)0x1801;
|
| | |
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (PlayerID, NetDataType.DWORD);
|
| | | WriteBytes (PlayerID, NetDataType.DWORD);
WriteBytes(EquipClassLV, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HB212_tagMCZhuXianBossCnt;
|
| | | ModelCenter.Instance.GetModel<JadeDynastyBossModel>().OnReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsJadeDynastyBoss", _m_IsJadeDynastyBoss); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsBossUnLocked", _m_IsBossUnLocked); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsAssistState", _m_IsAssistState); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetJadeDynastyBosses", _m_GetJadeDynastyBosses); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetParticipantCount", _m_GetParticipantCount); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetLatestUnLockBoss", _m_GetLatestUnLockBoss); |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryGetBossLine", _m_TryGetBossLine); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "TryEnterDungeon", _m_TryEnterDungeon); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "DisplayErrorTip", _m_DisplayErrorTip); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnReceivePackage", _m_OnReceivePackage); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "selectBossRefresh", _e_selectBossRefresh); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "bossLineRefresh", _e_bossLineRefresh); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "assistTimeRefresh", _e_assistTimeRefresh); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "jadeDynastyScoreRefresh", _e_jadeDynastyScoreRefresh); |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "challengeLimitCount", _g_get_challengeLimitCount); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "challengeTimes", _g_get_challengeTimes); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "assistTimes", _g_get_assistTimes); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectBossId", _g_get_selectBossId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "assginSelectBossId", _g_get_assginSelectBossId); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "redpoint", _g_get_redpoint); |
| | |
| | | |
| | | |
| | | return 2; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_IsAssistState(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyBossModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyBossModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsAssistState( ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_OnReceivePackage(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.JadeDynastyBossModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyBossModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | |
| | | if(gen_param_count == 2&& translator.Assignable<HA007_tagGCFBLinePlayerCnt>(L, 2)) |
| | | { |
| | | HA007_tagGCFBLinePlayerCnt _package = (HA007_tagGCFBLinePlayerCnt)translator.GetObject(L, 2, typeof(HA007_tagGCFBLinePlayerCnt)); |
| | | |
| | | gen_to_be_invoked.OnReceivePackage( _package ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | if(gen_param_count == 2&& translator.Assignable<HB212_tagMCZhuXianBossCnt>(L, 2)) |
| | | { |
| | | HB212_tagMCZhuXianBossCnt _package = (HB212_tagMCZhuXianBossCnt)translator.GetObject(L, 2, typeof(HB212_tagMCZhuXianBossCnt)); |
| | | |
| | | gen_to_be_invoked.OnReceivePackage( _package ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | return LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.JadeDynastyBossModel.OnReceivePackage!"); |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_SortCompare_xlua_st_(RealStatePtr L) |
| | | { |
| | | try { |
| | |
| | | |
| | | Snxxz.UI.JadeDynastyBossModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyBossModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.challengeTimes); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_assistTimes(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.JadeDynastyBossModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyBossModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.assistTimes); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.JadeDynastyBossModel.bossLineRefresh!"); |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_assistTimeRefresh(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | int gen_param_count = LuaAPI.lua_gettop(L); |
| | | Snxxz.UI.JadeDynastyBossModel gen_to_be_invoked = (Snxxz.UI.JadeDynastyBossModel)translator.FastGetCSObj(L, 1); |
| | | System.Action gen_delegate = translator.GetDelegate<System.Action>(L, 3); |
| | | if (gen_delegate == null) { |
| | | return LuaAPI.luaL_error(L, "#3 need System.Action!"); |
| | | } |
| | | |
| | | if (gen_param_count == 3) |
| | | { |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "+")) { |
| | | gen_to_be_invoked.assistTimeRefresh += gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | if (LuaAPI.xlua_is_eq_str(L, 2, "-")) { |
| | | gen_to_be_invoked.assistTimeRefresh -= gen_delegate; |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | LuaAPI.luaL_error(L, "invalid arguments to Snxxz.UI.JadeDynastyBossModel.assistTimeRefresh!"); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | return _recentlyChat;
|
| | | }
|
| | |
|
| | | public void SaveLocalRecentlyChat()
|
| | | {
|
| | | for (int i = 0; i < recentlyChats.Count; i++)
|
| | | {
|
| | | var localKey = StringUtility.Contact("RecentlyChat_", PlayerDatas.Instance.baseData.PlayerID, "_", i);
|
| | | LocalSave.SetString(localKey, recentlyChats[i].ToString());
|
| | | }
|
| | | }
|
| | |
|
| | | void GetLocalRecentlyChat()
|
| | | {
|
| | | recentlyChats.Clear();
|
| | | for (int i = 0; i < RecentlyChatNum; i++)
|
| | | {
|
| | | var localKey = StringUtility.Contact("RecentlyChat_", PlayerDatas.Instance.baseData.PlayerID, "_", i);
|
| | | if (LocalSave.HasKey(localKey))
|
| | | {
|
| | | var json = LocalSave.GetString(localKey);
|
| | | if (!string.IsNullOrEmpty(json))
|
| | | {
|
| | | RecentlyChat chat;
|
| | | if (RecentlyChat.TryParse(json, out chat))
|
| | | {
|
| | | recentlyChats.Add(chat);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (RecentlyChatChangeEvent != null)
|
| | | {
|
| | | RecentlyChatChangeEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | recentlyChat = null;
|
| | |
| | | public List<string> itemInfos = new List<string>();
|
| | | public List<int> itemIndexs = new List<int>();
|
| | | public List<string> itemNames = new List<string>();
|
| | |
|
| | | public RecentlyChat()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public RecentlyChat(string _chat)
|
| | | {
|
| | | display = _chat;
|
| | |
| | | {
|
| | | itemIndexs.Add(i);
|
| | | }
|
| | | }
|
| | |
|
| | | public override string ToString()
|
| | | {
|
| | | return LitJson.JsonMapper.ToJson(this);
|
| | | }
|
| | |
|
| | | public static bool TryParse(string json, out RecentlyChat chat)
|
| | | {
|
| | | chat = null;
|
| | | try
|
| | | {
|
| | | chat = LitJson.JsonMapper.ToObject<RecentlyChat>(json);
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | Debug.LogError(e.StackTrace + e.Message);
|
| | | return false;
|
| | | }
|
| | | return chat != null;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | GetLocalRecentlyChat();
|
| | | }
|
| | |
|
| | | #region 聊天浮动
|
| | |
| | | _recentlyChat = chatCenter.SaveRecentlyChat(result);
|
| | | }
|
| | | msg = CheckHasItem(result, _recentlyChat);
|
| | | chatCenter.SaveLocalRecentlyChat();
|
| | | chatCenter.recentlyChat = null;
|
| | |
|
| | | if (chatCenter.IsChatBanned || chatCenter.IsClientBan(type))
|
| | |
| | | unlockTypeName.text = itemCompound.secondTypeName;
|
| | | arrowImg.gameObject.SetActive(thirdType != 0);
|
| | | UpdateBtnImg(selectSecondType);
|
| | | if (firstType == (int)ComposeFuncType.Item
|
| | | && composeModel.secondTypeRedDict.ContainsKey(secondType))
|
| | |
|
| | | var index = composeModel.composeRedpointCategories.FindIndex((x) =>
|
| | | {
|
| | | return x.x == firstType && x.y == secondType;
|
| | | });
|
| | |
|
| | | if (index != -1)
|
| | | {
|
| | | redpoint.gameObject.SetActive(true);
|
| | | redpoint.redpointId = composeModel.secondTypeRedDict[secondType].id;
|
| | |
| | | #region 红点逻辑
|
| | | public const int COMPOSE_REDKEY = 109;
|
| | | public const int COMPOSETOOL_REDKEY = 10905;
|
| | | public const int COMPOSETICKET_REDKEY = 10903;
|
| | | public const int COMPOSEBTN_REDKEY = 10910;
|
| | | public Redpoint composeRed = new Redpoint(MainRedDot.RedPoint_key, COMPOSE_REDKEY);
|
| | | public Redpoint composeBtnRed = new Redpoint(COMPOSEBTN_REDKEY);
|
| | | public Redpoint composeToolRed = new Redpoint(COMPOSE_REDKEY, COMPOSETOOL_REDKEY);
|
| | | public Redpoint composeTicketRed = new Redpoint(COMPOSE_REDKEY, COMPOSETICKET_REDKEY);
|
| | | public Dictionary<int, Redpoint> secondTypeRedDict = new Dictionary<int, Redpoint>();
|
| | | public Dictionary<string, Redpoint> thirdTypeRedDict = new Dictionary<string, Redpoint>();
|
| | | public List<Int3> composeRedpointCategories = new List<Int3>();
|
| | | public void SetComposeTypeRed()
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("ComposeRedpoint");
|
| | | var stringArray = funcConfig.Numerical1.Split('|');
|
| | | for (int i = 0; i < stringArray.Length; i++)
|
| | | {
|
| | | Int3 category;
|
| | | if (Int3.TryParse(stringArray[i], out category))
|
| | | {
|
| | | composeRedpointCategories.Add(category);
|
| | | }
|
| | | }
|
| | |
|
| | | secondTypeRedDict.Clear();
|
| | | thirdTypeRedDict.Clear();
|
| | | if (composeDataDict.ContainsKey((int)ComposeFuncType.Item))
|
| | | //if (composeDataDict.ContainsKey((int)ComposeFuncType.Item))
|
| | | //{
|
| | | // var firstTypeData = composeDataDict[(int)ComposeFuncType.Item];
|
| | | // var secondTypeDict = firstTypeData.secondTypeDict;
|
| | | // foreach (var second in secondTypeDict.Keys)
|
| | | // {
|
| | | // var thirdTypeDict = secondTypeDict[second].thirdTypeDict;
|
| | | // int secondRedKey = COMPOSETOOL_REDKEY * 100 + second;
|
| | | // Redpoint secondRed = new Redpoint(COMPOSETOOL_REDKEY, secondRedKey);
|
| | | // secondTypeRedDict.Add(second, secondRed);
|
| | | // foreach (var third in thirdTypeDict.Keys)
|
| | | // {
|
| | | // int thirdRedKey = secondRedKey * 100 + third;
|
| | | // Redpoint thirdRed = new Redpoint(secondRedKey, thirdRedKey);
|
| | | // string key = StringUtility.Contact(second, 10, third);
|
| | | // thirdTypeRedDict.Add(key, thirdRed);
|
| | | // }
|
| | | // }
|
| | | //}
|
| | |
|
| | | foreach (var category in composeRedpointCategories)
|
| | | {
|
| | | var firstTypeData = composeDataDict[(int)ComposeFuncType.Item];
|
| | | var secondTypeDict = firstTypeData.secondTypeDict;
|
| | | foreach (var second in secondTypeDict.Keys)
|
| | | if (composeDataDict.ContainsKey(category.x))
|
| | | {
|
| | | var thirdTypeDict = secondTypeDict[second].thirdTypeDict;
|
| | | int secondRedKey = COMPOSETOOL_REDKEY * 100 + second;
|
| | | Redpoint secondRed = new Redpoint(COMPOSETOOL_REDKEY, secondRedKey);
|
| | | secondTypeRedDict.Add(second, secondRed);
|
| | | foreach (var third in thirdTypeDict.Keys)
|
| | | var firstTypeData = composeDataDict[category.x];
|
| | | var secondTypeDict = firstTypeData.secondTypeDict;
|
| | | foreach (var second in secondTypeDict.Keys)
|
| | | {
|
| | | int thirdRedKey = secondRedKey * 100 + third;
|
| | | Redpoint thirdRed = new Redpoint(secondRedKey, thirdRedKey);
|
| | | string key = StringUtility.Contact(second, 10, third);
|
| | | thirdTypeRedDict.Add(key, thirdRed);
|
| | | var thirdTypeDict = secondTypeDict[second].thirdTypeDict;
|
| | | int secondRedKey = COMPOSETICKET_REDKEY * 100 + second;
|
| | | Redpoint secondRed = new Redpoint(COMPOSETICKET_REDKEY, secondRedKey);
|
| | | secondTypeRedDict.Add(second, secondRed);
|
| | | foreach (var third in thirdTypeDict.Keys)
|
| | | {
|
| | | int thirdRedKey = secondRedKey * 100 + third;
|
| | | Redpoint thirdRed = new Redpoint(secondRedKey, thirdRedKey);
|
| | | string key = StringUtility.Contact(second, 10, third);
|
| | | thirdTypeRedDict.Add(key, thirdRed);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | readonly List<int> redpointItemTypes = new List<int>()
|
| | | {
|
| | | 35,
|
| | | 44,
|
| | | };
|
| | |
|
| | | private void OnItemCntRefresh(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.Item) return;
|
| | |
|
| | | ItemConfig itemConfig = ItemConfig.Get(id);
|
| | | if (itemConfig != null && itemConfig.Type == (int)ItemType.ComposeSuitStone)
|
| | | if (itemConfig != null && redpointItemTypes.Contains(itemConfig.Type))
|
| | | {
|
| | | RefreshComposeRed();
|
| | | }
|
| | |
| | |
|
| | | public void RefreshComposeRed()
|
| | | {
|
| | | ComposeFirstTypeData firstTypeData = null;
|
| | | TryGetFirstTypeData((int)ComposeFuncType.Item, out firstTypeData);
|
| | | if (firstTypeData == null
|
| | | || !FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Compose)) return;
|
| | |
|
| | | ComposeSecondTypeData secondTypeData = null;
|
| | | TryGetSecondTypeData((int)ComposeFuncType.Item, 3, out secondTypeData);
|
| | | if (secondTypeData != null)
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Compose))
|
| | | {
|
| | | var thirdTypeDict = secondTypeData.thirdTypeDict;
|
| | | foreach (var third in thirdTypeDict.Keys)
|
| | | return;
|
| | | }
|
| | |
|
| | | foreach (var category in composeRedpointCategories)
|
| | | {
|
| | | ComposeSecondTypeData secondTypeData = null;
|
| | | TryGetSecondTypeData(category.x, category.y, out secondTypeData);
|
| | | if (secondTypeData != null)
|
| | | {
|
| | | List<ComposeThirdTypeData> thirdTypeDatas = thirdTypeDict[third];
|
| | | for (int i = 0; i < thirdTypeDatas.Count; i++)
|
| | | var thirdTypeDict = secondTypeData.thirdTypeDict;
|
| | | foreach (var third in thirdTypeDict.Keys)
|
| | | {
|
| | | var itemCompound = thirdTypeDatas[i].itemCompound;
|
| | | int makeID = itemCompound.makeID[0];
|
| | | string key = StringUtility.Contact(3, 10, third);
|
| | | if (IsComposeJobLimit(makeID) && IsEnoughFixedMat(itemCompound))
|
| | | List<ComposeThirdTypeData> thirdTypeDatas = thirdTypeDict[third];
|
| | | for (int i = 0; i < thirdTypeDatas.Count; i++)
|
| | | {
|
| | | if (thirdTypeRedDict[key].state != RedPointState.Simple)
|
| | | var itemCompound = thirdTypeDatas[i].itemCompound;
|
| | | int makeID = itemCompound.makeID[0];
|
| | | string key = StringUtility.Contact(category.y, 10, third);
|
| | | if (IsEnoughFixedMat(itemCompound))
|
| | | {
|
| | | thirdTypeRedDict[key].state = RedPointState.Simple;
|
| | | if (thirdTypeRedDict[key].state != RedPointState.Simple)
|
| | | {
|
| | | thirdTypeRedDict[key].state = RedPointState.Simple;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (thirdTypeRedDict[key].state != RedPointState.None)
|
| | | else
|
| | | {
|
| | | thirdTypeRedDict[key].state = RedPointState.None;
|
| | | if (thirdTypeRedDict[key].state != RedPointState.None)
|
| | | {
|
| | | thirdTypeRedDict[key].state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | m_ChallengeRemind.gameObject.SetActive(false);
|
| | | if (result.grade >= 5)
|
| | | {
|
| | | if (satisfyChallengeNext)
|
| | | if (satisfyChallengeNext || result.lineID + 1 >= dungeonNuwaModel.floorCount)
|
| | | {
|
| | | if (result.firstPassItem != null && result.firstPassItem.Length > 0)
|
| | | {
|
| | |
| | | switch (currentDugeonId)
|
| | | {
|
| | | case JadeDynastyBossModel.JADEDYNASTY_MAP:
|
| | | if (jadeDynastyBossModel.IsAssistState())
|
| | | {
|
| | | mineValueText.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | mineValueText.text = UIHelper.ReplaceLargeNum((ulong)hurt);
|
| | | }
|
| | | mineValueText.text = UIHelper.ReplaceLargeNum((ulong)hurt);
|
| | | break;
|
| | | default:
|
| | | if (mineRankText != null)
|
| | |
| | |
|
| | | private void DisplayAssistHurt()
|
| | | {
|
| | | if (jadeDynastyBossModel.IsAssistState())
|
| | | {
|
| | | mineRankText.text = Language.Get("JadeDynastyBossDungeon9");
|
| | | mineValueText.text = string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | mineRankText.text = Language.Get("DemonJar16");
|
| | | }
|
| | | mineRankText.text = Language.Get("DemonJar16");
|
| | | }
|
| | |
|
| | | private void SetDefault()
|
| | |
| | |
|
| | | public event Action<int> selectBossRefresh;
|
| | | public event Action bossLineRefresh;
|
| | | public event Action assistTimeRefresh;
|
| | | public event Action jadeDynastyScoreRefresh;
|
| | |
|
| | | public int challengeLimitCount { get; private set; }
|
| | | public int challengeTimes { get; private set; }
|
| | | public int assistTimes { get; private set; }
|
| | |
|
| | | int m_SelectBossId = 0;
|
| | | public int selectBossId
|
| | |
| | | {
|
| | | jadeDynastyBossLineDict.Clear();
|
| | | challengeTimes = 0;
|
| | | assistTimes = 0;
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsAssistState()
|
| | | {
|
| | | var totalTimes = dungeonModel.GetTotalTimes(JADEDYNASTY_MAP);
|
| | | var enterTimes = dungeonModel.GetEnterTimes(JADEDYNASTY_MAP);
|
| | | if (enterTimes >= totalTimes && assistTimes > 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public List<int> GetJadeDynastyBosses()
|
| | | {
|
| | | List<int> list = new List<int>();
|
| | |
| | |
|
| | | var totalTimes = dungeonModel.GetTotalTimes(JADEDYNASTY_MAP);
|
| | | var enterTimes = dungeonModel.GetEnterTimes(JADEDYNASTY_MAP);
|
| | | if (enterTimes >= totalTimes && assistTimes <= 0)
|
| | | if (enterTimes >= totalTimes)
|
| | | {
|
| | | error = 4;
|
| | | return false;
|
| | |
| | | {
|
| | | bossLineRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnReceivePackage(HB212_tagMCZhuXianBossCnt package)
|
| | | {
|
| | | assistTimes = package.Cnt;
|
| | | if (assistTimeRefresh != null)
|
| | | {
|
| | | assistTimeRefresh();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public static int SortCompare(JadeDynastyBossData lhs, JadeDynastyBossData rhs)
|
| | |
| | | if (existAnyChallengeable)
|
| | | {
|
| | | var count = dungeonModel.GetTotalTimes(JADEDYNASTY_MAP) - dungeonModel.GetEnterTimes(JADEDYNASTY_MAP);
|
| | | redpoint.count = count + assistTimes;
|
| | | redpoint.count = count;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | [SerializeField] NewDropItemTrigger m_NewDrop;
|
| | | [SerializeField] ItemCell[] m_Items;
|
| | | [SerializeField] Text m_ChallengeTimes;
|
| | | [SerializeField] Text m_AssistTimes;
|
| | | [SerializeField] Text m_JadeDynastyScore;
|
| | | [SerializeField] Button m_BuyTimes;
|
| | | [SerializeField] Transform m_SurpassLevel;
|
| | |
| | | findPreciousModel.bossSubscribeChangeEvent += DisplaySubscribe;
|
| | | findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
|
| | | model.bossLineRefresh += BossLineRefresh;
|
| | | model.assistTimeRefresh += AssistTimeRefresh;
|
| | | model.jadeDynastyScoreRefresh += JadeDynastyScoreRefresh;
|
| | | }
|
| | |
|
| | |
| | | findPreciousModel.bossSubscribeChangeEvent -= DisplaySubscribe;
|
| | | findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
|
| | | model.bossLineRefresh -= BossLineRefresh;
|
| | | model.assistTimeRefresh -= AssistTimeRefresh;
|
| | | model.jadeDynastyScoreRefresh -= JadeDynastyScoreRefresh;
|
| | |
|
| | | refreshBossStateTime = -1f;
|
| | |
| | | DisplaySubscribe(model.selectBossId);
|
| | | DisplayKillRecord();
|
| | | DisplayBelongTo();
|
| | | DisplayAssistTimes();
|
| | | DisplayJadeDynastyScore();
|
| | | }
|
| | |
|
| | |
| | | var enterTimes = dungeonModel.GetEnterTimes(JadeDynastyBossModel.JADEDYNASTY_MAP);
|
| | |
|
| | | m_ChallengeTimes.text = StringUtility.Contact(totalTimes - enterTimes, "/", model.challengeLimitCount);
|
| | | }
|
| | |
|
| | | public void DisplayAssistTimes()
|
| | | {
|
| | | m_AssistTimes.text = model.assistTimes.ToString();
|
| | | }
|
| | |
|
| | | void DisplayDropItems()
|
| | |
| | | private void BossLineRefresh()
|
| | | {
|
| | | DisplayBelongTo();
|
| | | }
|
| | |
|
| | | private void AssistTimeRefresh()
|
| | | {
|
| | | DisplayAssistTimes();
|
| | | }
|
| | |
|
| | | private void ChallengeTimesRefresh()
|
| | |
| | |
|
| | | public class HoistingWin : Window
|
| | | {
|
| | | [SerializeField] Transform Content;
|
| | | [SerializeField] ScrollRect m_Scroller;
|
| | | [SerializeField] Button FairyLandButton;//仙界秘境;
|
| | | [SerializeField] Button WorldBossButton;//世界Boss按钮
|
| | | [SerializeField] Button PrayerButton;//祈愿
|
| | | [SerializeField] Button BountyTaskButton;//赏金
|
| | | [SerializeField] Button m_DailyQuest;
|
| | | [SerializeField] Button HangUpButton;//挂机
|
| | | [SerializeField] Button FairyTaskButton;//仙盟任务
|
| | |
|
| | | [SerializeField] Vector2 m_Size;
|
| | |
|
| | | private int number = 0;
|
| | | DungeonModel m_DungeonModel;
|
| | | DungeonModel dungeonModel { get { return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); } }
|
| | |
| | | Close();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.WelfareFunc2);
|
| | | });
|
| | | BountyTaskButton.AddListener(() =>
|
| | | {
|
| | | Close();
|
| | | dailyquestmodel.wannaLookDailyQuest = (int)DailyQuestType.BountyMission;
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc1);
|
| | |
|
| | | });
|
| | | HangUpButton.AddListener(() =>
|
| | | {
|
| | | Close();
|
| | |
| | | Close();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionTask);
|
| | | });
|
| | | m_DailyQuest.AddListener(() =>
|
| | | {
|
| | | Close();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc1);
|
| | | });
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | number = 0;
|
| | | Content.gameObject.SetActive(true);
|
| | |
|
| | | DungeonRecord dungeonRecord;
|
| | | dungeonModel.TryGetRecord(31080, out dungeonRecord);
|
| | | var times = dungeonRecord == null ? 0 : dungeonRecord.enterTimes;
|
| | | if (FuncOpen.Instance.IsFuncOpen(86) && dungeonModel.GetTotalTimes(31080) > times)//仙界秘境
|
| | | {
|
| | | number++;
|
| | | FairyLandButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(21) && GeneralDefine.bossWearyValues[0] + Worldmodel.extraBossWearyValue > Worldmodel.wearyValue)
|
| | | {
|
| | | number++;
|
| | | WorldBossButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(60) && ModelCenter.Instance.GetModel<PrayerModel>().expPrayerCnt < ModelCenter.Instance.GetModel<PrayerModel>().GetAllExpPrayCnt())//祈愿
|
| | | {
|
| | | number++;
|
| | | PrayerButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | |
| | | PrayerButton.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(34))//赏金
|
| | | if (FuncOpen.Instance.IsFuncOpen(78))
|
| | | {
|
| | | bool _bool = false;
|
| | | foreach (var value in taskmodel.SpecialTask.Values)
|
| | | {
|
| | | if (value.Type == 13 && value.MissionState != 0 && value.MissionState != 3)
|
| | | {
|
| | | _bool = true;
|
| | | }
|
| | | }
|
| | | foreach (var value in taskmodel.BountyDic.Values)
|
| | | {
|
| | | if (value.MissionState != 0 && value.MissionState != 3)
|
| | | {
|
| | | _bool = true;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | if (_bool)
|
| | | {
|
| | | BountyTaskButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | BountyTaskButton.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | number++;
|
| | | m_DailyQuest.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | BountyTaskButton.gameObject.SetActive(false);
|
| | | m_DailyQuest.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(40))//挂机
|
| | | {
|
| | | number++;
|
| | | HangUpButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | |
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen(16) && TaskAllocation.Instance.FairyAuAllNumber() < taskmodel.FairyAuTaskCount_Day)//仙盟任务
|
| | | {
|
| | | number++;
|
| | | FairyTaskButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | FairyTaskButton.gameObject.SetActive(false);
|
| | | }
|
| | | for (int i = 0; i < Content.childCount; i++)
|
| | | {
|
| | |
|
| | | if (Content.GetChild(i).gameObject.activeSelf)
|
| | | {
|
| | | number += 1;
|
| | | }
|
| | | m_Scroller.verticalNormalizedPosition = 1f;
|
| | |
|
| | | }
|
| | | if (number <= 0)
|
| | | {
|
| | | Content.gameObject.SetActive(false);
|
| | | }
|
| | | var size = number * 64f + Mathf.Max(number - 1, 0) * 6;
|
| | | size = Mathf.Clamp(size, m_Size.x, m_Size.y);
|
| | | var rect = m_Scroller.transform as RectTransform;
|
| | | rect.sizeDelta = rect.sizeDelta.SetY(size);
|
| | | m_Scroller.enabled = number > 4;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | DisplayPlayer();
|
| | |
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | if (dataType == PlayerDataType.EquipShowSwitch)
|
| | | {
|
| | | DisplayPlayer();
|
| | | }
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | List<int> displayIds = new List<int>();
|
| | |
| | | this.m_Title.text = RealmConfig.Get(realm).Name; |
| | | model.selectedLevelChangeEvent += OnSelected; |
| | | |
| | | DisplayBackGround(model.selectedLevel == this.level); |
| | | m_Select.SetListener(Select); |
| | | } |
| | | |
| | |
| | | this.wing = info.wing; |
| | | |
| | | SelectLevel(1); |
| | | WindowCenter.Instance.Open<OtherPlayerEquipWin>(); |
| | | } |
| | | |
| | | public void SelectLevel(int level) |
| | |
| | | if (equipDetailsGroups.ContainsKey(level)) |
| | | { |
| | | selectedLevel = level; |
| | | if (!WindowCenter.Instance.IsOpen<OtherPlayerEquipWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<OtherPlayerEquipWin>(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | var sendInfo = new CC002_tagCGViewCrossPlayerInfo(); |
| | | sendInfo.PlayerID = (uint)playerId; |
| | | sendInfo.EquipClassLV= (byte)level; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | break; |
| | |
| | | { |
| | | equipDetailsGroups[info.EquipClassLV] = new EquipDetailsGroup(playerJob, info.EquipClassLV, info.ItemData); |
| | | selectedLevel = info.EquipClassLV; |
| | | |
| | | if (!WindowCenter.Instance.IsOpen<OtherPlayerEquipWin>()) |
| | | { |
| | | WindowCenter.Instance.Open<OtherPlayerEquipWin>(); |
| | | } |
| | | } |
| | | |
| | | public Dictionary<int, EquipBrief> GetEquipBriefs() |
| | |
| | | case 5:
|
| | | if (!WindowCenter.Instance.IsOpen<RoleParticularsWin>())
|
| | | {
|
| | | RoleParticularsWin.viewType = viewPlayerType;
|
| | | WindowCenter.Instance.Open<RoleParticularsWin>();
|
| | | }
|
| | | break;
|
| | |
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] RawImage m_RawPlayer;
|
| | |
|
| | | public static int viewType = -1;
|
| | |
|
| | | RoleParticularModel model { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
|
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | | OtherPlayerEquipModel otherPlayerEquipModel { get { return ModelCenter.Instance.GetModel<OtherPlayerEquipModel>(); } }
|
| | |
| | |
|
| | | otherPlayerEquipModel.ViewPlayerEquip(new OtherPlayerEquipModel.PlayerBriefInfo()
|
| | | {
|
| | | viewType = model.viewPlayerType,
|
| | | viewType = viewType,
|
| | | id = model.viewPlayer,
|
| | | realm = viewPlayerData.rolePropData.RealmLV,
|
| | | job = viewPlayerData.rolePropData.Job,
|
| | |
| | | [SerializeField] Transform m_Container;
|
| | | [SerializeField] Button m_Induction;
|
| | |
|
| | | int taskId = 0;
|
| | |
|
| | | TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_Induction.SetListener(OnInduction);
|
| | | }
|
| | |
|
| | | public void Display()
|
| | | public void Display(int taskId)
|
| | | {
|
| | | this.taskId = taskId;
|
| | |
|
| | | m_Container.gameObject.SetActive(true);
|
| | | model.onInductionTaskComplete -= OnInductionTaskComplete;
|
| | | model.onInductionTaskComplete += OnInductionTaskComplete;
|
| | |
| | |
|
| | | private void OnInduction()
|
| | | {
|
| | | if (taskModel.GetTaskStatus(taskId) == TaskModel.TaskStatus.CardLevel)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TaskInductionError_2");
|
| | | return;
|
| | | }
|
| | |
|
| | | var pak = new CA512_tagCMThinkMagicWeapon();
|
| | | pak.MWID = (uint)model.selectedTreasure;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | |
| | | else if (type == ScrollerDataType.Normal)
|
| | | {
|
| | | var taskCell = cell as HumanInductionTaskCell;
|
| | | taskCell.Display();
|
| | | taskCell.Display(cell.index);
|
| | | }
|
| | | }
|
| | |
|