System/Chat/ChatCenter.cs
@@ -760,6 +760,7 @@ if (!WindowCenter.Instance.CheckOpen<SocialWin>()) { ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy; WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(false, 2); } } System/Chat/ChatTip.cs
@@ -154,6 +154,7 @@ if (mapId == 31230) { ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy; WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(false, 2); return; } @@ -226,9 +227,11 @@ switch (ChatCtrl.Inst.presentChatType) { case ChatInfoType.Team: WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(false, 1); break; case ChatInfoType.Fairy: WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(false, 2); break; default: System/Compose/New/ComposeWin.cs
@@ -67,6 +67,35 @@ protected override void OnPreOpen() { ComposeModel.ResetModel(); if(WindowJumpMgr.Instance.IsJumpState) { if(ComposeModel.CurComposeModel != null) { ComposeModel.SetJumpToModel((ComposeFuncType)ComposeModel.CurComposeModel.firstType, ComposeModel.CurComposeModel.secondType, ComposeModel.CurComposeModel.thirdType); switch ((ComposeFuncType)ComposeModel.CurComposeModel.firstType) { case ComposeFuncType.Wings: functionOrder = _wingsUITitleType.order; break; case ComposeFuncType.Ticket: functionOrder = _ticketUITitleType.order; break; case ComposeFuncType.Fairy: functionOrder = _godequipUITitleType.order; break; case ComposeFuncType.Equip: functionOrder = _equipUITitleType.order; break; case ComposeFuncType.Item: functionOrder = _itemUITitleType.order; break; case ComposeFuncType.MountDogz: functionOrder = _dogzEquipFunc.order; break; } } } } protected override void OnActived() System/FriendSystem/New/FriendsModel.cs
@@ -911,6 +911,11 @@ else { ChatCtrl.Inst.presentChatType = ChatInfoType.Friend; if (WindowCenter.Instance.CheckOpen<SocialWin>()) { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<SocialWin>(); } WindowCenter.Instance.Open<ChatWin>(); } } System/FriendSystem/New/SocialWin.cs
@@ -49,7 +49,10 @@ protected override void OnAfterClose() { if (!WindowJumpMgr.Instance.IsJumpState) { WindowCenter.Instance.Open<MainInterfaceWin>(); } } private void ClickXianYuanBtn() System/KnapSack/Logic/ItemModel.cs
@@ -56,15 +56,14 @@ useDataDict = ConfigParse.Analysis(info.UserData); this.equipScore = modelInterface.SetEquipScore(packType,itemInfo.ItemID,useDataDict); DebugEx.Log("Pack:" + packType + "ID:" + info.ItemID + "GUID:" + info.ItemGUID); if(GetUseDataModel((int)ItemUseDataKey.Def_IudetItemCount) != null) { itemInfo.ItemCount = GetUseDataModel((int)ItemUseDataKey.Def_IudetItemCount)[0]; } List<int> itemEffectTime = GetUseDataModel((int)ItemUseDataKey.Def_IudetCreateTime); if(itemEffectTime != null && itemEffectTime[0] != 0 && chinItemModel.ExpireTime > 0) { DebugEx.Log("创建时间:" + itemEffectTime[0]); //System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区 //DateTime dt = startTime.AddSeconds(itemEffectTime[0]); //DesignDebug.Log("创建DataTime:" + dt); switch ((EquipReduceType)chinItemModel.EndureReduceType) { case EquipReduceType.Def_EquipReduceType_None: System/MainInterfacePanel/ChatFrame.cs
@@ -307,6 +307,7 @@ //MainRedDot.Instance.redPointFriendChat.state = RedPointState.None; //ChatCtrl.Inst.presentChatType = ChatInfoType.Friend; //WindowCenter.Instance.Open<ChatWin>(); WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(); } System/Realm/RealmUpWin.cs
@@ -41,6 +41,7 @@ [SerializeField] UIEffect m_RealmDungeonSfx; [SerializeField] Button m_SingleDungeon; [SerializeField] Button m_FuncButton; [SerializeField] Text m_FuncButtonTxt; [SerializeField] Text m_RealmStageTip; @@ -73,6 +74,7 @@ protected override void AddListeners() { m_SingleDungeon.onClick.AddListener(SingleDungeon); m_FuncButton.onClick.AddListener(OnFunctionClick); m_RealmPreview.onClick.AddListener(OnRealmPreview); } @@ -325,9 +327,11 @@ var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel); m_FuncButton.gameObject.SetActive(!realmModel.IsRealmHighest); m_SingleDungeon.gameObject.SetActive(false); if (_realmPoint >= config.NeedPoint) { m_FuncButtonTxt.text = Language.Get(config.IsBigRealm == 1 ? "RealmWin_Bewrite_13" : "RealmWin_Bewrite_12"); m_SingleDungeon.gameObject.SetActive(config.IsBigRealm == 1 && !realmModel.IsRealmHighest); } else { @@ -370,6 +374,16 @@ } } private void SingleDungeon() { var _realmPoint = PlayerDatas.Instance.extersion.realmPoint; var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel); if (_realmPoint >= config.NeedPoint) { ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(RealmModel.REALM_DUNGEON_ID, config.IsBigRealm == 1 ? 1 : 0); } } private void OnRealmPreview() { WindowCenter.Instance.Open<RealmPreviewWin>(); System/RolePromote/RolePromoteModel.cs
@@ -137,6 +137,7 @@ #region 配置 public Dictionary<int, int> wingLv2GenerDict = new Dictionary<int, int>(); public Dictionary<int, List<RoleStrongerConfig>> roleStrongerDic = new Dictionary<int, List<RoleStrongerConfig>>(); List<int> promotePercents = new List<int>(); void ParseConfig() { var dict = Config.Instance.GetAllValues<RoleStrongerConfig>(); @@ -151,290 +152,51 @@ } list.Add(cfg); } var _funcCfg = Config.Instance.Get<FuncConfigConfig>("WingLV"); LitJson.JsonData _json = LitJson.JsonMapper.ToObject(_funcCfg.Numerical1); var funcConfig = Config.Instance.Get<FuncConfigConfig>("WingLV"); LitJson.JsonData _json = LitJson.JsonMapper.ToObject(funcConfig.Numerical1); foreach (var _wingLv in _json.Keys) { wingLv2GenerDict.Add(int.Parse(_wingLv), int.Parse(_json[_wingLv].ToString())); } funcConfig = Config.Instance.Get<FuncConfigConfig>("FightpowerUp"); promotePercents.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1)); } public List<RoleStrongerConfig> GetRoleStrongerList(int funcType) public List<RoleStrongerConfig> GetStrongerConfigs(int funcType) { List<RoleStrongerConfig> list = null; roleStrongerDic.TryGetValue(funcType, out list); return list; } public bool IsHighestStage(int funcType, int id) public int GetPromoteState(int percent) { List<RoleStrongerConfig> list = GetRoleStrongerList(funcType); if (list != null && list.Count > 0) for (int i = 0; i < promotePercents.Count; i++) { if (id == list[list.Count - 1].id) if (percent <= promotePercents[i]) { return true; return i; } } return false; return promotePercents.Count - 1; } #endregion public RoleStrongerConfig GetPresentRoleStronger(int funcType, out int presentValue, out bool reached) public RoleStrongerConfig GetPresentRoleStronger(int funcType) { presentValue = 0; List<RoleStrongerConfig> list = GetRoleStrongerList(funcType); reached = false; List<RoleStrongerConfig> list = GetStrongerConfigs(funcType); int i = 0; int presentLevel = PlayerDatas.Instance.baseData.LV; if (list != null && list.Count > 0) { switch ((FuncPowerType)list[0].funcType) for (i = 0; i < list.Count; i++) { case FuncPowerType.Equip: { for (i = 0; i < list.Count; i++) { presentValue = GetEquipCnt(list[i].conditions[0] , list[i].conditions.Length > 1 ? list[i].conditions[1] : 0 , list[i].conditions.Length > 2 ? list[i].conditions[2] : 0); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Plus: { var packTypeModel = playerPack.GetSinglePackModel(PackType.rptEquip); if (packTypeModel == null || packTypeModel.GetPackModelIndexDict() == null || packTypeModel.GetPackModelIndexDict().Count == 0) { return list[0]; } foreach (var itemPlace in packTypeModel.GetPackModelIndexDict().Keys) { presentValue += strengthengmodel.StrengthenTheCeiling(itemPlace); } for (i = 0; i < list.Count; i++) { if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Rune: { for (i = 0; i < list.Count; i++) { bool _satisfy = GetRuneCnt(list[i].conditions[0], out presentValue); if (presentLevel < list[i].LV) { break; } if (!_satisfy || presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.GodWeapon: { for (i = 0; i < list.Count; i++) { var magicianData = magicianModel.GetMagicianData(list[i].conditions[0]); if (magicianData == null) { return list[i]; } presentValue = magicianData.level; if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Horse: { for (i = 0; i < list.Count; i++) { int _itemColor = list[i].conditions.Length > 1 ? list[i].conditions[1] : 0; int _lv = list[i].conditions.Length > 0 ? list[i].conditions[0] : 0; presentValue = GetMountCnt(_itemColor, _lv); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Wing: { var itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing); if (itemModel == null) { presentValue = 0; break; } ItemConfig _tagChinItemModel = Config.Instance.Get<ItemConfig>((int)itemModel.itemInfo.ItemID); presentValue = wingLv2GenerDict[_tagChinItemModel.LV]; for (i = 0; i < list.Count; i++) { if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].conditions[0]) { presentValue = 0; return list[i]; } } } break; case FuncPowerType.Stone: { presentValue = allStoneLv; for (i = 0; i < list.Count; i++) { if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Suit: { for (i = 0; i < list.Count; i++) { presentValue = SuitModel.GetSameSuitCntByType((SuitType)list[i].conditions[0]); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Wash: { for (i = 0; i < list.Count; i++) { presentValue = GetWashCnt(list[i].conditions[0]); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Prestige: { for (i = 0; i < list.Count; i++) { presentValue = PlayerDatas.Instance.baseData.realmLevel; if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Pet: { for (i = 0; i < list.Count; i++) { presentValue = GetPetCnt(list[i].conditions.Length > 1 ? list[i].conditions[1] : list[i].conditions[0]); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; case FuncPowerType.Demon: case FuncPowerType.Fairy: case FuncPowerType.Human: { for (i = 0; i < list.Count; i++) { if (presentLevel < list[i].LV) { break; } Treasure treasure = null; presentValue = 0; if (treasureModel.TryGetTreasure(list[i].targetValue, out treasure)) { if (treasure.state == TreasureState.Collected) { presentValue = 1; continue; } } return list[i]; } } break; case FuncPowerType.BlastFurnace: { for (i = 0; i < list.Count; i++) { presentValue = GetBlastFurnaceDragUseCount(list[i].conditions.Length > 0 ? list[i].conditions[0] : 1); if (presentLevel < list[i].LV) { break; } if (presentValue < list[i].targetValue) { return list[i]; } } } break; if (presentLevel < list[i].LV) { return list[i]; } } reached = true; i = Mathf.Max(0, i - 1); i = Mathf.Min(list.Count - 1, i); return list[i]; return list[list.Count - 1]; } return null; } System/RolePromote/RoleStrongerCell.cs
@@ -11,76 +11,60 @@ RolePromoteModel m_Model; RolePromoteModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RolePromoteModel>()); } get { return ModelCenter.Instance.GetModel<RolePromoteModel>(); } } RoleParticularModel m_RoleParticularModel; RoleParticularModel roleParticularModel { get { return m_RoleParticularModel ?? (m_RoleParticularModel = ModelCenter.Instance.GetModel<RoleParticularModel>()); } get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } } [SerializeField] Image funcIcon; [SerializeField] Text presentFightPowerTxt; [SerializeField] Transform m_ContainerStrongerLabel; [SerializeField] Text strongerFightPowerTxt; [SerializeField] Text targetTxt; [SerializeField] Text m_FuncTxt; [SerializeField] Button strongerBtn; [SerializeField] GameObject reachTxtObj; [SerializeField] GameObject reachImgObj; [SerializeField] Image m_FuncIcon; [SerializeField] Text m_FightPower; [SerializeField] Text m_FuncName; [SerializeField] Image m_State; [SerializeField] Slider m_Slider; [SerializeField] Text m_Progress; [SerializeField] Button m_Goto; public override void Refresh(CellView cell) { int funcType = cell.index; int presentTargetValue = 0; bool reached = false; var cfg = model.GetPresentRoleStronger(funcType, out presentTargetValue, out reached); strongerBtn.onClick.RemoveAllListeners(); if (cfg != null) var config = model.GetPresentRoleStronger(funcType); m_Goto.onClick.RemoveAllListeners(); if (config != null) { var highestStage = model.IsHighestStage(funcType, cfg.id) && reached; funcIcon.SetSprite(cfg.Icon); m_FuncTxt.text = cfg.Name; ulong _presentFightPower = 0; _presentFightPower = roleParticularModel.GetFuncFightPower(funcType); presentFightPowerTxt.text = Language.Get("RolePromoteNowFight", _presentFightPower); m_FuncIcon.SetSprite(config.Icon); m_FuncName.text = config.Name; ulong fightPower = roleParticularModel.GetFuncFightPower(funcType); var highestStage = fightPower >= (ulong)config.recommendFightPower; m_FightPower.text = Language.Get("RolePromoteNowFight", fightPower); strongerFightPowerTxt.text = StringUtility.Contact(_presentFightPower >= (ulong)cfg.recommendFightPower ? Language.Get("RolePromoteMoreFight") : Language.Get("RolePromoteBetterFight"), _presentFightPower >= (ulong)cfg.recommendFightPower ? cfg.strongerFightPower : cfg.recommendFightPower); strongerFightPowerTxt.color = _presentFightPower >= (ulong)cfg.recommendFightPower ? UIHelper.GetUIColor(TextColType.Red) : UIHelper.GetUIColor(TextColType.Green, true); if (!highestStage) var progress = Mathf.Clamp01((float)fightPower / config.recommendFightPower); var percent = (int)(progress * 100); m_Slider.value = progress; m_Progress.text = StringUtility.Contact(percent, "%"); var state = model.GetPromoteState(percent); switch (state) { if (funcType == (int)FuncPowerType.Human || funcType == (int)FuncPowerType.Demon || funcType == (int)FuncPowerType.Fairy) { targetTxt.text = StringUtility.Contact(cfg.desc, "(", UIHelper.GetTextColorByItemColor(presentTargetValue > 0 ? TextColType.Green : TextColType.Red, presentTargetValue.ToString()), "/", 1, ")"); } else { targetTxt.text = StringUtility.Contact(cfg.desc, "(", UIHelper.GetTextColorByItemColor(presentTargetValue >= cfg.targetValue ? TextColType.Green : TextColType.Red, presentTargetValue.ToString()), "/", cfg.targetValue, ")"); } case 0: m_State.SetSprite("XT_WYBQ_3"); break; case 1: m_State.SetSprite("XT_WYBQ_2"); break; case 2: m_State.SetSprite("XT_WYBQ_1"); break; } m_State.SetNativeSize(); reachTxtObj.SetActive(highestStage); reachImgObj.SetActive(highestStage); targetTxt.gameObject.SetActive(!highestStage); strongerBtn.gameObject.SetActive(!highestStage); m_ContainerStrongerLabel.gameObject.SetActive(!highestStage); strongerBtn.onClick.AddListener(() => m_Goto.onClick.AddListener(() => { WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)cfg.OpenUI); WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.OpenUI); }); } System/Skill/ScrollerController.cs
@@ -423,7 +423,7 @@ public void ResetScrollPos() { if (_data.Count == 0) if (_data.Count == 0 || !inited) { return; } System/Team/TeamInviteEntrancePanel.cs
@@ -23,20 +23,20 @@ private void OpenFriend() { WindowCenter.Instance.Open<TeamInviteWin>(); model.InvitePlayers(TeamInviteType.Friend); WindowCenter.Instance.Open<TeamInviteWin>(); } private void OpenFairy() { WindowCenter.Instance.Open<TeamInviteWin>(); model.InvitePlayers(TeamInviteType.Fairy); WindowCenter.Instance.Open<TeamInviteWin>(); } private void OpenNearby() { WindowCenter.Instance.Open<TeamInviteWin>(); model.InvitePlayers(TeamInviteType.NearBy); WindowCenter.Instance.Open<TeamInviteWin>(); } private void Awake() System/Treasure/TreasureNewGotWin.cs
@@ -317,7 +317,8 @@ index++; if (treasure.treasureStages[k].unlockType == TreasureStageUnlock.Func || treasure.treasureStages[k].unlockType == TreasureStageUnlock.Skill || treasure.treasureStages[k].unlockType == TreasureStageUnlock.Treasure) treasure.treasureStages[k].unlockType == TreasureStageUnlock.Treasure || treasure.treasureStages[k].unlockType == TreasureStageUnlock.TreasureSoul) { _stage = treasure.treasureStages[k]; displayStageCount++; System/WindowJump/WindowJumpMgr.cs
@@ -628,7 +628,16 @@ case JumpUIType.UnionChat1: case JumpUIType.UnionChat2: ChatCtrl.Inst.presentChatType = (ChatInfoType)(int.Parse(_tagWinSearchModel.SelectActive) - 1); SetJumpLogic<ChatWin>(_tagWinSearchModel.TABID); switch (ChatCtrl.Inst.presentChatType) { case ChatInfoType.Team: case ChatInfoType.Fairy: SetJumpLogic<SocialWin>(_tagWinSearchModel.TABID); break; default: SetJumpLogic<ChatWin>(_tagWinSearchModel.TABID); break; } break; case JumpUIType.MakeDrug: if (PackSendQuestMgr.Instance.useItemModel != null) Utility/EnumHelper.cs
@@ -1452,10 +1452,10 @@ { Def_IudetMapLoaction = 15, // 物品记录地图坐标[mapid, posx, posy] Def_IudetLegendAttrID = 17, //物品传奇属性ID列表 Def_IudetItemCount = 18, // 物品个数,支持20亿,目前仅特殊转化物品会用到 Def_IudetLegendAttrValue = 19, //物品传奇属性值列表 Def_IudetOutOfPrintAttrID = 21, //物品绝版属性ID列表 Def_IudetOutOfPrintAttrValue = 23, //物品绝版属性值列表 Def_IudetItemColor = 16, //物品颜色,如果该值没有就取物品 Def_IudetCancelUseLimit = 20, //物品取消使用限制