Merge remote-tracking branch 'origin/master' into HazyRegion_1
| | |
| | | title = _titleID,
|
| | | name = PlayerDatas.Instance.baseData.PlayerName,
|
| | | alliance = _familyName,
|
| | | forceShowRealm = FuncOpen.Instance.IsFuncOpen(12),
|
| | | }
|
| | | );
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | m_HeadUpName.SetPlayerRealm(_realm, FuncOpen.Instance.IsFuncOpen(12));
|
| | | m_HeadUpName.SetPlayerRealm(_realm);
|
| | | }
|
| | |
|
| | | private void OnFunctionOpen(int functionId)
|
| | |
| | | {
|
| | | _hero.MoveToPosition(Pos, 1f);
|
| | | }
|
| | |
|
| | | PrepareHandler.Instance.TriggerOnShowCollect(ServerInstID, NpcConfig.NPCID);
|
| | | }
|
| | |
|
| | | protected override void HandleOnClick()
|
| | | {
|
| | | if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ)
|
| | | {
|
| | | base.HandleOnClick();
|
| | | }
|
| | | // if (NpcConfig.NPCID != GeneralDefine.GatherSoulDZ)
|
| | | // {
|
| | | // base.HandleOnClick();
|
| | | // }
|
| | | }
|
| | |
|
| | | protected override void OnUnit()
|
| | |
| | | public UnityAction<uint, int> OnShowCollectIcon; |
| | | public UnityAction<uint, int> OnHideCollectIcon; |
| | | |
| | | public void TriggerOnShowCollect(uint sid, int npcId) |
| | | { |
| | | if (OnShowCollectIcon != null) |
| | | { |
| | | OnShowCollectIcon(sid, npcId); |
| | | } |
| | | } |
| | | |
| | | public void Init() |
| | | { |
| | | NPCInteractProcessor.s_NpcInteractEvent -= HandleCallback; |
| | | NPCInteractProcessor.s_NpcInteractEvent += HandleCallback; |
| | | |
| | | WindowCenter.Instance.windowAfterOpenEvent -= CheckOpenCollectIcon; |
| | | WindowCenter.Instance.windowAfterOpenEvent += CheckOpenCollectIcon; |
| | | WindowCenter.Instance.windowAfterCloseEvent -= CheckCloseCollectIcon; |
| | |
| | | } |
| | | } |
| | | |
| | | private void HandleCallback(E_NpcType type, int npcID, uint sid) |
| | | public void HandleCallback(E_NpcType type, int npcID, uint sid) |
| | | { |
| | | var _target = GAMgr.Instance.GetBySID(sid); |
| | | if (!(_target is GA_NpcCollect)) |
| | |
| | | _hero.SelectTarget = _npc; |
| | | } |
| | | |
| | | if (OnShowCollectIcon != null) |
| | | { |
| | | OnShowCollectIcon(_npc.ServerInstID, _npc.NpcConfig.NPCID); |
| | | } |
| | | |
| | | _checkDis = MathUtility.DistanceSqrtXZ(_hero.Pos, _npc.Pos); |
| | | |
| | | if (_checkDis < 4f) |
| | | { |
| | | if (OnShowCollectIcon != null) |
| | | { |
| | | OnShowCollectIcon(_npc.ServerInstID, _npc.NpcConfig.NPCID); |
| | | } |
| | | |
| | | NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, _npc.NpcConfig.NPCID, _npc.ServerInstID); |
| | | var _dir = MathUtility.ForwardXZ(_npc.Pos, _hero.Pos); |
| | | _hero.Forward = _dir; |
| | | } |
| | |
| | | GameNetSystem.Instance.SendInfo(sendBytes.ToArray()); |
| | | } |
| | | |
| | | int readIndex = 0; |
| | | int readIndex = 2; |
| | | public uint TransUintBytes(byte[] value, LuaGameNetSystem.NetDataType type) |
| | | { |
| | | var length = GetBytesLength(type); |
| | |
| | | {
|
| | | var count = (int)Mathf.Ceil(m_SplitSlider.value);
|
| | |
|
| | | var isAddReikiPoint = false;
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config != null && config.Effect1 == 200)
|
| | | {
|
| | | isAddReikiPoint = true;
|
| | | }
|
| | |
|
| | | var items = packModel.GetItemsById(PackType.Item, itemId);
|
| | | if (items != null)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (isAddReikiPoint)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<ReikiRootModel>().reikiPointPromoteSymbol = true;
|
| | | }
|
| | |
|
| | | CloseImmediately();
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | else if (ItemOperateUtility.Instance.CheckItemUselimit(itemId))
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | if (config != null && config.Effect1 == 200)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<ReikiRootModel>().reikiPointPromoteSymbol = true;
|
| | | }
|
| | | ItemOperateUtility.Instance.UseItem(list[0].guid);
|
| | | }
|
| | | }
|
| | |
| | | |
| | | if (m_Realm != null && m_RealmContainer != null) |
| | | { |
| | | if (RealmConfig.Has(_realm)) |
| | | if (_realm > 0 && RealmConfig.Has(_realm)) |
| | | { |
| | | m_RealmContainer.gameObject.SetActive(true); |
| | | var realmConfig = RealmConfig.Get(_realm); |
| | |
| | | m_NameTxt.text = data.PlayerName;
|
| | | m_JobTxt.text = OccupationNameConfig.GetOccupationName(data.Job, 1);
|
| | | RealmConfig presentCfg = RealmConfig.Get(data.Realm);
|
| | | if (presentCfg != null)
|
| | | if (data.Realm > 0 && presentCfg != null)
|
| | | {
|
| | | m_RealmImage.gameObject.SetActive(true);
|
| | | m_RealmImage.SetSprite(presentCfg.Img);
|
| | |
| | | { |
| | | var own = (int)UIHelper.GetMoneyCnt(1);//拥有的仙玉 |
| | | var need = NeedCostJade; |
| | | var strLanguage = Language.Get("FairyLand_Func13", NeedCostJade, need); |
| | | var strLanguage = Language.Get("FairyLand_Func13", NeedCostJade); |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) => |
| | | { |
| | | if (isOk) |
| | |
| | | {
|
| | | int fairyJade = 0;
|
| | | fairyJade = resourcesBackClass.NormalCostJade - CostJade;
|
| | | string strLanguage = string.Format(Language.Get("FairyLand_Func13"), CostJade, resourcesBackClass.NormalCostJade, fairyJade);
|
| | | string strLanguage = string.Format(Language.Get("FairyLand_Func13"), CostJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | {
|
| | | int fairyJade = 0;
|
| | | fairyJade = resourcesBackClass.VipCostJade - CostJade;
|
| | | string strLanguage = string.Format(Language.Get("FairyLand_Func13"), CostJade, resourcesBackClass.VipCostJade, fairyJade);
|
| | | string strLanguage = string.Format(Language.Get("FairyLand_Func13"), CostJade);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strLanguage, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | |
| | | if (m_Realm != null && m_RealmContainer != null) |
| | | { |
| | | if (RealmConfig.Has(_realm)) |
| | | if (_realm > 0 && RealmConfig.Has(_realm)) |
| | | { |
| | | m_RealmContainer.gameObject.SetActive(true); |
| | | var realmConfig = RealmConfig.Get(_realm); |
| | |
| | | var npcConfig = NPCConfig.Get(_npcId);
|
| | | if (npcConfig != null)
|
| | | {
|
| | | if (RealmConfig.Has(npcConfig.ClientRealm))
|
| | | if (npcConfig.ClientRealm > 0 && RealmConfig.Has(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm);
|
| | |
| | | }
|
| | | var realmLevel = fairyMember.OfficialRank;
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | if (config != null)
|
| | | if (realmLevel>0&& config != null)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_Realm.SetSprite(config.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_Transmit.gameObject.SetActive(fairyMember.PlayerID != PlayerDatas.Instance.baseData.PlayerID);
|
| | | if (fairyMember.PlayerID != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | |
| | | m_BossName.color = UIHelper.GetUIColor(horseConfig.Quality, true);
|
| | | }
|
| | |
|
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm);
|
| | | if (realmConfig != null)
|
| | | if (npcConfig.ClientRealm > 0 && RealmConfig.Has(npcConfig.ClientRealm))
|
| | | {
|
| | | m_RealmIcon.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm);
|
| | | m_RealmIcon.SetSprite(realmConfig.Img);
|
| | | m_RealmIcon.SetNativeSize();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RealmIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void BossProgressUpdate(int _bossId)
|
| | |
| | | public class FairyMemberCell : ScrollerUI
|
| | | {
|
| | | FairyModel m_Model;
|
| | | FairyModel model
|
| | | {
|
| | | get
|
| | | {
|
| | | FairyModel model {
|
| | | get {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<FairyModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | KingFairyModel m_KingFairyModel;
|
| | | KingFairyModel kingFairyModel
|
| | | {
|
| | | get
|
| | | {
|
| | | KingFairyModel kingFairyModel {
|
| | | get {
|
| | | return m_KingFairyModel ?? (m_KingFairyModel = ModelCenter.Instance.GetModel<KingFairyModel>());
|
| | | }
|
| | | }
|
| | |
| | | m_NameTxt.color = UIHelper.GetUIColor(fairyMember.PlayerID == PlayerDatas.Instance.PlayerId ?
|
| | | TextColType.Green : TextColType.NavyBrown, true);
|
| | | int realmLv = fairyMember.OfficialRank;
|
| | | var realmConfig = RealmConfig.Get(realmLv);
|
| | | m_RealmImg.gameObject.SetActive(realmConfig != null);
|
| | | if (realmConfig != null)
|
| | | if (realmLv > 0 && RealmConfig.Has(realmLv))
|
| | | {
|
| | | var realmConfig = RealmConfig.Get(realmLv);
|
| | | m_RealmImg.gameObject.SetActive(true);
|
| | | m_RealmImg.SetSprite(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RealmImg.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_LvTxt.text = fairyMember.LV.ToString();
|
| | | m_DutyTxt.text = Language.Get(string.Format("L102{0}", fairyMember.FamilyLV + 1));
|
| | | m_ContributeTxt.text = fairyMember.FamilyActiveValue.ToString();
|
| | |
| | | m_BossLevel.text = Language.Get("Z1024", _level);
|
| | | if (m_Realm != null && m_RealmContainer != null)
|
| | | {
|
| | | if (RealmConfig.Has(_realm))
|
| | | if (_realm > 0 && RealmConfig.Has(_realm))
|
| | | {
|
| | | m_RealmContainer.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(_realm);
|
| | |
| | |
|
| | | if (m_Realm != null && m_RealmContainer != null)
|
| | | {
|
| | | if (RealmConfig.Has(_realm))
|
| | | if (_realm > 0 && RealmConfig.Has(_realm))
|
| | | {
|
| | | m_RealmContainer.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(_realm);
|
| | |
| | | lvText.text = friendPlayer.LV.ToString(); |
| | | } |
| | | RealmConfig realmModel = RealmConfig.Get(friendPlayer.RealmLV); |
| | | if (friendPlayer.RealmLV != 0) |
| | | if (friendPlayer.RealmLV > 0 && RealmConfig.Has(friendPlayer.RealmLV)) |
| | | { |
| | | realmIcon.gameObject.SetActive(true); |
| | | realmIcon.SetSprite(realmModel.Img); |
| | |
| | | private GameObject _searchBG; |
| | | |
| | | private bool _isRecommend = true; |
| | | public bool IsRecommend |
| | | { |
| | | public bool IsRecommend { |
| | | get { return _isRecommend; } |
| | | set { _isRecommend = value; } |
| | | } |
| | | private string _strSearch = ""; |
| | | |
| | | FriendsModel _friendsModel; |
| | | FriendsModel friendsModel |
| | | { |
| | | get |
| | | { |
| | | FriendsModel friendsModel { |
| | | get { |
| | | return _friendsModel ?? (_friendsModel = ModelCenter.Instance.GetModel<FriendsModel>()); |
| | | } |
| | | } |
| | |
| | | { |
| | | _addfriendCtrl = transform.Find("AddFriendCtrl").GetComponent<ScrollerController>(); |
| | | _addfriendCtrl.OnRefreshCell += OnRefreshAddFriendCell; |
| | | |
| | | |
| | | _addfriendGroup = transform.Find("AddFriendCtrl").GetComponent<ToggleGroup>(); |
| | | _titleText = transform.Find("SearchTitle/Text").GetComponent<Text>(); |
| | | _refreshBtn = transform.Find("RefreshBtn").GetComponent<Button>(); |
| | |
| | | _searchBG = transform.Find("BG").gameObject; |
| | | _searchGo = transform.Find("SearchTitle").gameObject; |
| | | |
| | | _refreshBtn.onClick.AddListener(()=> { OnClickRefreshBtn(); }); |
| | | _lookBtn.onClick.AddListener(()=> { OnClickLookBtn(); }); |
| | | _inputPlayerName.onValueChanged.AddListener((string inputStr)=> { OnEndInput(inputStr); }); |
| | | _refreshBtn.onClick.AddListener(() => { OnClickRefreshBtn(); }); |
| | | _lookBtn.onClick.AddListener(() => { OnClickLookBtn(); }); |
| | | _inputPlayerName.onValueChanged.AddListener((string inputStr) => { OnEndInput(inputStr); }); |
| | | |
| | | ChatCtrl.Inst.OnClickCloseChatEvent += CloseFriendlist; |
| | | } |
| | |
| | | { |
| | | FriendListUICtrl(false); |
| | | } |
| | | |
| | | |
| | | public void OnInit() |
| | | { |
| | | _addfriendCtrl.vertical = true; |
| | | RefreshRecommendModel(); |
| | | friendsModel.RefreshRecommendFriendEvent -= RefreshRecommendModel; |
| | | friendsModel.RefreshRecommendFriendEvent += RefreshRecommendModel; |
| | | friendsModel.RefreshRecommendFriendEvent -= RefreshRecommendModel; |
| | | friendsModel.RefreshRecommendFriendEvent += RefreshRecommendModel; |
| | | TimeDownMgr.CoolTimeData data; |
| | | if (TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.BagSort, out data)) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | _refreshText.text = Language.Get("FriendsPlayer101",time); |
| | | _refreshText.text = Language.Get("FriendsPlayer101", time); |
| | | _refreshBtn.interactable = false; |
| | | _refreshText.color = greyColor; |
| | | } |
| | |
| | | private void OnRefreshAddFriendCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | cell.GetComponent<Toggle>().group = _addfriendGroup; |
| | | FriendPlayer data =friendsModel.GetAddFriendInfo((uint)cell.index); |
| | | FriendPlayer data = friendsModel.GetAddFriendInfo((uint)cell.index); |
| | | Text friendName = cell.transform.Find("PlayerNameText").GetComponent<Text>(); |
| | | Text friendLv = cell.transform.Find("Contain_LV/PlayerLv").GetComponent<Text>(); |
| | | Image friendLvIcon = cell.transform.Find("Contain_LV/PlayerLvIcon").GetComponent<Image>(); |
| | |
| | | |
| | | |
| | | RealmConfig realmModel = RealmConfig.Get(data.RealmLV); |
| | | if (data.RealmLV != 0) |
| | | if (data.RealmLV > 0 && RealmConfig.Has(data.RealmLV)) |
| | | { |
| | | titleIcon.gameObject.SetActive(true); |
| | | titleIcon.SetSprite(realmModel.Img); |
| | |
| | | stateText.gameObject.SetActive(false); |
| | | } |
| | | |
| | | Dictionary<uint, FriendPlayer> friendDict =friendsModel.GetFriendInfoDict((byte)GroupType.Friend); |
| | | if(friendDict != null) |
| | | Dictionary<uint, FriendPlayer> friendDict = friendsModel.GetFriendInfoDict((byte)GroupType.Friend); |
| | | if (friendDict != null) |
| | | { |
| | | if (friendDict.ContainsKey(data.PlayerID)) |
| | | { |
| | |
| | | //stateText.text = Language.Get("Friend105"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Friend106")); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void OnEndInput(string inputStr) |
| | |
| | | |
| | | public void OnClickRefreshBtn() |
| | | { |
| | | friendsModel.OnSendCA9A3_tagCGQueryRecommendFriends(); |
| | | friendsModel.OnSendCA9A3_tagCGQueryRecommendFriends(); |
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.BagSort, 5.0f, RefreshTime); |
| | | _refreshImage.SetSprite("BlackBtn"); |
| | | _refreshText.text = Language.Get("FriendsPlayer101",5); |
| | | _refreshText.text = Language.Get("FriendsPlayer101", 5); |
| | | _refreshBtn.interactable = false; |
| | | _refreshText.color = greyColor; |
| | | } |
| | |
| | | } |
| | | isOnline.text = friendsModel.GetOnlineType(data.OnlineType); |
| | | RealmConfig realmModel = RealmConfig.Get(data.RealmLV); |
| | | if (data.RealmLV != 0) |
| | | if (data.RealmLV > 0 && RealmConfig.Has(data.RealmLV)) |
| | | { |
| | | titleIcon.gameObject.SetActive(true); |
| | | titleIcon.SetSprite(realmModel.Img); |
| | |
| | | Image realmImg = cell.transform.Find("RealmImage").GetComponent<Image>(); |
| | | DebugEx.Log("境界:" + friendInfo.RealmLV); |
| | | RealmConfig realmConfig = RealmConfig.Get(friendInfo.RealmLV); |
| | | if (friendInfo.RealmLV > 0) |
| | | if (friendInfo.RealmLV > 0 && RealmConfig.Has(friendInfo.RealmLV)) |
| | | { |
| | | realmImg.gameObject.SetActive(true); |
| | | realmImg.SetSprite(realmConfig.Img); |
| | |
| | | if (UIHelper.GetMoneyCnt(1) >= (ulong)cost)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
|
| | | Language.Get("GenerateBossCostConfirm", cost, (ulong)cost),
|
| | | Language.Get("GenerateBossCostConfirm", cost),
|
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | |
|
| | | void SendGotoIncidentDungeon(HazyRegionConfig config)
|
| | | {
|
| | | if (config.dungeonType == 2)
|
| | | if (config.dungeonId == HazyGrassModel.FairyGrassMapId ||
|
| | | config.dungeonId == HazyGrassModel.ReikiGrassMapId ||
|
| | | config.dungeonId == HazyDemonKingModel.DEMONKINGMAPID2)
|
| | | {
|
| | | var pak = new CC105_tagCMEnterCrossServer();
|
| | | pak.DataMapID = (uint)config.dungeonId;
|
| | |
| | | m_ScoreOrType.text = itemConfig.ItemTypeName; |
| | | } |
| | | |
| | | if (itemConfig.RealmLimit >= 0) |
| | | if (itemConfig.RealmLimit > 0 && RealmConfig.Has(itemConfig.RealmLimit)) |
| | | { |
| | | m_RealmContainer.gameObject.SetActive(true); |
| | | var realmConfig = RealmConfig.Get(itemConfig.RealmLimit); |
| | |
| | | var itemConfig = ItemConfig.Get(betterModel.itemId);
|
| | | m_EquipName.text = itemConfig.ItemName;
|
| | | m_EquipName.color = UIHelper.GetUIColor(itemConfig.ItemColor, true);
|
| | | m_FunctionTitle.text = Language.Get(itemConfig.ItemColor >= 3 ? "GoodEquip_See" : "GoodEquip_FitUp");
|
| | |
|
| | | var isView = (PlayerDatas.Instance.baseData.LV < GeneralDefine.BlueEquipJumpLevel && itemConfig.ItemColor >= 2)
|
| | | || itemConfig.ItemColor >= 3;
|
| | | m_FunctionTitle.text = Language.Get(isView ? "GoodEquip_See" : "GoodEquip_FitUp");
|
| | |
|
| | | m_EquipBehaviour.button.SetListener(() => { ItemTipUtility.Show(betterModel.guid, false); });
|
| | | m_EquipBehaviour.Init(betterModel, true);
|
| | |
| | | int collectNpcId = 0;
|
| | | uint serverInstanceId = 0;
|
| | |
|
| | | DungeonModel dungeonModel {
|
| | | DungeonModel dungeonModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<DungeonModel>(); }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | collectNpcId = npcId;
|
| | | serverInstanceId = sid;
|
| | |
|
| | | var mapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | m_ContainerNormalCollect.gameObject.SetActive(false);
|
| | | m_GatherSoulBuild.gameObject.SetActive(false);
|
| | |
| | | {
|
| | | if (collectNpcId != 0 && serverInstanceId != 0)
|
| | | {
|
| | | NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, collectNpcId, serverInstanceId);
|
| | | PrepareHandler.Instance.HandleCallback(E_NpcType.Collect, collectNpcId, serverInstanceId);
|
| | | // NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, collectNpcId, serverInstanceId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var taskInfoConfig = TASKINFOConfig.Get(StrConversa);
|
| | | if (taskInfoConfig == null)
|
| | | {
|
| | | DebugEx.LogError("任务表格配置错误");
|
| | | return;
|
| | | taskInfoConfig = TASKINFOConfig.Get(StrConversa.ToLower());
|
| | | if(taskInfoConfig == null) |
| | | {
|
| | | DebugEx.LogError("任务表格配置错误");
|
| | | return;
|
| | | }
|
| | | |
| | | }
|
| | | if (taskmodel.BountyDic.ContainsKey(_TaskId) || taskmodel.FairyAuDic.ContainsKey(_TaskId))
|
| | | {
|
| | |
| | | { |
| | | var realm = PlayerDatas.Instance.baseData.realmLevel; |
| | | var config = RealmConfig.Get(realm); |
| | | if (config != null) |
| | | if (config != null ) |
| | | { |
| | | m_Realm.SetSprite(config.Img); |
| | | } |
| | |
| | | treasureModel.treasureStageUpEvent += OnTreasureStageChange;
|
| | | achievementModel.achievementAwardableEvent += OnAchievementAwardAble;
|
| | | prayerModel.freeCoinPrayerStateChange += OnFreeCoinPrayer;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += OnBossShowEnd;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | treasureModel.treasureStageUpEvent -= OnTreasureStageChange;
|
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardAble;
|
| | | prayerModel.freeCoinPrayerStateChange -= OnFreeCoinPrayer;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= OnBossShowEnd;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | achievementModel.achievementAwardableEvent += OnAchievementAwardAble;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += OnTreasureShowEnd;
|
| | | prayerModel.freeCoinPrayerStateChange += OnFreeCoinPrayer;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += OnBossShowEnd;
|
| | | }
|
| | |
|
| | | private void OnWindowPreClose(Window _window)
|
| | |
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardAble;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent -= OnTreasureShowEnd;
|
| | | prayerModel.freeCoinPrayerStateChange -= OnFreeCoinPrayer;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= OnBossShowEnd;
|
| | | }
|
| | |
|
| | | private void OnFunctionOpen(int _functionId)
|
| | |
| | | CheckNewBieGuide();
|
| | | }
|
| | |
|
| | | private void OnBossShowEnd()
|
| | | {
|
| | | CheckNewBieGuide();
|
| | | }
|
| | |
|
| | | private void CheckNewBieGuide()
|
| | | {
|
| | | var mapConfig = MapConfig.Get(PlayerDatas.Instance.baseData.MapID);
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (guides != null)
|
| | | {
|
| | | NewBieCenter.Instance.CheckNewBieGuides(guides);
|
| | |
| | | else
|
| | | {
|
| | | var _rank = 0;
|
| | | if(!rankModel.TryGetMyRank((int)model.GetRankType(model.presentSelectType),out _rank))
|
| | | if (!rankModel.TryGetMyRank((int)model.GetRankType(model.presentSelectType), out _rank))
|
| | | {
|
| | | _rank = -1;
|
| | | }
|
| | |
| | | case RankType.OpenServerRealm:
|
| | | m_TargetImg.gameObject.SetActive(_hasData && _playerData.value >= 0);
|
| | | m_TotalTargetValue.gameObject.SetActive(!_hasData);
|
| | | if (_hasData && _playerData.value >= 0)
|
| | | if (_hasData && _playerData.value > 0)
|
| | | {
|
| | | var _realmConfig = RealmConfig.Get(_playerData.value);
|
| | | m_TargetImg.SetSprite(_realmConfig == null ? string.Empty : _realmConfig.Img);
|
| | |
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState && functionOrder < 2)//是否进行跳转
|
| | | {
|
| | | if (mountModel.IsHorsePanelState() > petmodel.IsPetPanelRedPointState())
|
| | | if (mountModel.IsHorsePanelState() < petmodel.IsPetPanelRedPointState())
|
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | |
| | | break;
|
| | | case RankType.JadeDynastyTower:
|
| | | realmLv = (int)data.value1;
|
| | | jobText.text = data.cmpValue +Language.Get("JadeDynastyBossDungeon_Floor") ;
|
| | | rankWhat.text =(10000-data.cmpValue2) +Language.Get("RealmWin_Bewrite_35") ;
|
| | | jobText.text = data.cmpValue + Language.Get("JadeDynastyBossDungeon_Floor");
|
| | | rankWhat.text = (10000 - data.cmpValue2) + Language.Get("RealmWin_Bewrite_35");
|
| | | break;
|
| | | default:
|
| | | rankWhat.text = data.cmpValue.ToString();
|
| | |
| | | break;
|
| | | }
|
| | | RealmConfig presentCfg = RealmConfig.Get(realmLv);
|
| | | if (presentCfg != null)
|
| | | if (realmLv > 0 && presentCfg != null)
|
| | | {
|
| | | realmImg.gameObject.SetActive(data.type != (int)RankType.Realm);
|
| | | m_CompareImg.gameObject.SetActive(data.type == (int)RankType.Realm);
|
| | |
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | m_Icon.SetSprite(config.Img);
|
| | | if (realmLevel > 0 && RealmConfig.Has(realmLevel))
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | m_Icon.gameObject.SetActive(true);
|
| | | m_Icon.SetSprite(config.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Icon.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayProperty()
|
| | |
| | |
|
| | | public bool openFromTreasureSkill { get; set; }
|
| | |
|
| | | public bool reikiPointPromoteSymbol { get; set; }
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(101, 10103); |
| | |
|
| | | public event Action onCacheFreePointRefresh;
|
| | |
| | | m_ReikiRootFreePoints.Clear();
|
| | | isServerPrepare = false;
|
| | | resetReikiRootRecord = false;
|
| | | reikiPointPromoteSymbol = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | RefreshRedpoint();
|
| | |
|
| | | if (freePoint > lastFreePoint && isServerPrepare
|
| | | && WindowCenter.Instance.IsOpen<AlchemyUseDrugWin>())
|
| | | && WindowCenter.Instance.IsOpen<AlchemyUseDrugWin>()
|
| | | && reikiPointPromoteSymbol)
|
| | | {
|
| | | ReikiRootPointPromoteWin.point = new Int2(lastFreePoint, freePoint);
|
| | | WindowCenter.Instance.Open<ReikiRootPointPromoteWin>();
|
| | | }
|
| | | lastFreePoint = freePoint;
|
| | | reikiPointPromoteSymbol = false;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | case FuncPowerType.Realm:
|
| | | handled = true;
|
| | | var realmConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (realmConfig != null)
|
| | | if (PlayerDatas.Instance.baseData.realmLevel > 0 && realmConfig != null)
|
| | | {
|
| | | m_MyRealmIcon.gameObject.SetActive(true);
|
| | | m_MyRealmIcon.SetSprite(realmConfig.Img);
|
| | |
| | | m_MyDescs[0].text = config.compareTip[0];
|
| | | }
|
| | | realmConfig = RealmConfig.Get(otherPlayerInfo.rolePropData.RealmLV);
|
| | | if (realmConfig != null)
|
| | | if (otherPlayerInfo.rolePropData.RealmLV > 0 && realmConfig != null)
|
| | | {
|
| | | m_CompareRealmIcon.gameObject.SetActive(true);
|
| | | m_CompareRealmIcon.SetSprite(realmConfig.Img);
|
| | |
| | | var towerFloorConfig = RuneTowerFloorConfig.Get(model.selectedFloor);
|
| | | var npcConfig = NPCConfig.Get(towerFloorConfig.BossId);
|
| | |
|
| | | if (RealmConfig.Has(npcConfig.ClientRealm))
|
| | | if (npcConfig.ClientRealm > 0 && RealmConfig.Has(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm);
|
| | |
| | |
|
| | | var level = 0;
|
| | | var selectExpertSkill = 0;
|
| | | if (model.TryGetExpertSkill(selectSkillId, out selectExpertSkill)
|
| | | && selectExpertSkill != selectExpert && model.TryGetExpertActiveLevel(selectExpert, out level)
|
| | | model.TryGetExpertSkill(selectSkillId, out selectExpertSkill);
|
| | | if (selectExpertSkill != selectExpert && model.TryGetExpertActiveLevel(selectExpert, out level)
|
| | | && level > 0)
|
| | | {
|
| | | var pak = new CA516_tagCMSelectSkillElement();
|
| | |
| | | var towerConfig = SkyTowerConfig.Get(model.currentFloor); |
| | | var npcConfig = NPCConfig.Get(towerConfig.bossId); |
| | | |
| | | if (RealmConfig.Has(npcConfig.ClientRealm)) |
| | | if (npcConfig.ClientRealm > 0 && RealmConfig.Has(npcConfig.ClientRealm)) |
| | | { |
| | | m_BossRealm.gameObject.SetActive(true); |
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm); |
| | |
| | | WindowCenter.Instance.Open<EquipFrameWin>(false, 0);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.Mount:
|
| | | WindowCenter.Instance.Open<PetWin>(false, 1);
|
| | | WindowCenter.Instance.Open<PetWin>(false, 0);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.Pet:
|
| | | WindowCenter.Instance.Open<PetWin>(false, 0);
|
| | | WindowCenter.Instance.Open<PetWin>(false, 1);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.RuneMosaic:
|
| | | WindowCenter.Instance.Open<RunePanel>();
|
| | |
| | | |
| | | if (m_Realm != null) |
| | | { |
| | | if (RealmConfig.Has(npcConfig.ClientRealm)) |
| | | if (npcConfig.ClientRealm > 0 && RealmConfig.Has(npcConfig.ClientRealm)) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = RealmConfig.Get(npcConfig.ClientRealm); |
| | |
| | | {
|
| | | m_PlayerName.text = info.name;
|
| | | m_HangHint.gameObject.SetActive(info.isHang);
|
| | | SetPlayerRealm((int)info.realm, info.forceShowRealm);
|
| | | SetPlayerRealm((int)info.realm);
|
| | | SetTitle(info.title);
|
| | | SetAlliance(info.alliance);
|
| | | SyncPosition(true);
|
| | | }
|
| | |
|
| | | public void SetPlayerRealm(int realm, bool forceShow = false)
|
| | | public void SetPlayerRealm(int realm)
|
| | | {
|
| | | if (m_Realm)
|
| | | {
|
| | | var show = forceShow || realm != 0;
|
| | | if (show && RealmConfig.Has(realm))
|
| | | if (realm > 0 && RealmConfig.Has(realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | |
| | | {
|
| | | if (m_Realm != null)
|
| | | {
|
| | | if (RealmConfig.Has(_realm))
|
| | | if (_realm > 0 && RealmConfig.Has(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | |
| | | public struct PlayerInfo
|
| | | {
|
| | | public uint realm;
|
| | | public bool forceShowRealm;
|
| | | public uint title;
|
| | | public string name;
|
| | | public string alliance;
|