| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年8月5日
|
| | | // [ Date ]: 2025年8月27日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: YYL
|
| | | // [ Date ]: 2025年8月5日
|
| | | // [ Date ]: 2025年8月27日
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public partial class RealmLVUPTaskConfig : ConfigBase<int, RealmLVUPTaskConfig> |
| | | { |
| | | //官职:任务ID:索引id |
| | | private static Dictionary<int, Dictionary<int, int>> missionDict = new Dictionary<int, Dictionary<int, int>>(); |
| | | private static Dictionary<int, Dictionary<int, RealmLVUPTaskConfig>> missionDict = new Dictionary<int, Dictionary<int, RealmLVUPTaskConfig>>(); |
| | | |
| | | protected override void OnConfigParseCompleted() |
| | | { |
| | | if (!missionDict.ContainsKey(Lv)) |
| | | { |
| | | missionDict.Add(Lv, new Dictionary<int, int>()); |
| | | missionDict.Add(Lv, new Dictionary<int, RealmLVUPTaskConfig>()); |
| | | } |
| | | missionDict[Lv][TaskID] = ID; |
| | | missionDict[Lv][TaskID] = this; |
| | | } |
| | | |
| | | public static int GetID(int realmLV, int taskID) |
| | | public static RealmLVUPTaskConfig GetID(int realmLV, int taskID) |
| | | { |
| | | if (missionDict.ContainsKey(realmLV) && missionDict[realmLV].ContainsKey(taskID)) |
| | | { |
| | | return missionDict[realmLV][taskID]; |
| | | } |
| | | return -1; |
| | | return null; |
| | | } |
| | | |
| | | public static List<int> GetMissionIDs(int lv) |
| | |
| | | public byte FBID; //fb id |
| | | public byte realmLevel; //官职 |
| | | public byte VIPLv; //VIP等级 |
| | | public uint ExAttr1; // 协助目标玩家ID,非0变0退出协助 |
| | | public uint ExAttr1; // 策划配置关卡ID为201,即 过关2-1(0/1) ,使用 ExAttr1 值判断,如ExAttr1值为20103代表当前已经过了第2章第1关第3波,包含了波,需要击败该关卡boss后才算该关过关 |
| | | public uint teamAutoOperateFlag; //扩展属性2,各项目专用 |
| | | public int dungeonLineId; // 副本线路id |
| | | public int dungeonMapId; // 副本用作 DataMapId,单人副本存在1.假副本 2.服务端1对客户端多地图同分线 3.服务端1对客户端多地图不同分线 |
| | |
| | | CON = _serverInfo.CON; |
| | | Setting = _serverInfo.Setting; |
| | | FBID = _serverInfo.FBID; |
| | | ExAttr1 = _serverInfo.ExAttr1; |
| | | ExAttr1 = _serverInfo.ExAttr1; //策划配置关卡ID为201,即 过关2-1(0/1) ,使用 ExAttr1 值判断,如ExAttr1值为20103代表当前已经过了第2章第1关第3波,包含了波,需要击败该关卡boss后才算该关过关 |
| | | teamAutoOperateFlag = _serverInfo.ExAttr2; |
| | | dungeonLineId = (int)_serverInfo.ExAttr3 % 1000; |
| | | dungeonMapId = (int)_serverInfo.ExAttr3 / 1000; |
New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A5 23 提升境界等级 # tagCMRealmLVUp
|
| | |
|
| | | public class CA523_tagCMRealmLVUp : GameNetPackBasic {
|
| | |
|
| | | public CA523_tagCMRealmLVUp () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA523;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3a06990786c9e0942bdb91bbcb19914c |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | |
| | | [SerializeField] Button changeHeroPosBtn; |
| | | |
| | | //等级 |
| | | [SerializeField] Button officialUpBtn; |
| | | |
| | | |
| | | //底部功能 |
| | | [SerializeField] Button autoBtn; |
| | | [SerializeField] Button blessLVBtn; |
| | | [SerializeField] Text blessLVText; |
| | |
| | | InvestModel.Instance.BuyInvest(InvestModel.monthCardType); |
| | | }); |
| | | |
| | | blessLVBtn.AddListener(()=> |
| | | { |
| | | blessLVBtn.AddListener(() => |
| | | { |
| | | UIManager.Instance.OpenWindow<BlessLVWin>(); |
| | | }); |
| | | |
| | | officialUpBtn.AddListener(()=> |
| | | { |
| | | if (RealmConfig.GetKeys().Count <= PlayerDatas.Instance.baseData.realmLevel) |
| | | return; |
| | | UIManager.Instance.OpenWindow<OfficialUpWin>(); |
| | | }); |
| | | } |
| | | |
| | | |
New file |
| | |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 官职升级界面 |
| | | /// </summary> |
| | | public class OfficialLVUPSuccessWin : UIBase |
| | | { |
| | | |
| | | [SerializeField] Text beforeNameText; |
| | | [SerializeField] Text nameText; |
| | | [SerializeField] Text lvText; |
| | | [SerializeField] Text nextLVText; |
| | | [SerializeField] Text[] attrNameText; |
| | | [SerializeField] Text[] attrPerTextArr; |
| | | [SerializeField] Text[] nextAttrPerTextArr; |
| | | [SerializeField] Button okBtn; |
| | | |
| | | |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | okBtn.AddListener(CloseWindow); |
| | | } |
| | | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | |
| | | Refresh(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | |
| | | public override void Refresh() |
| | | { |
| | | var beforeConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel - 1); |
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); |
| | | beforeNameText.text = beforeConfig.Name; |
| | | beforeNameText.color = OfficialRankManager.Instance.GetOfficialRankColor(beforeConfig.Quality); |
| | | nameText.text = config.Name; |
| | | nameText.color = OfficialRankManager.Instance.GetOfficialRankColor(config.Quality); |
| | | lvText.text = beforeConfig.LVMax.ToString(); |
| | | nextLVText.text = config.LVMax.ToString(); |
| | | |
| | | for (int i = 0; i < attrNameText.Length; i++) |
| | | { |
| | | attrNameText[i].text = PlayerPropertyConfig.Get(config.AddAttrType[i]).Name; |
| | | attrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(config.AddAttrType[i], beforeConfig.AddAttrType[i]); |
| | | nextAttrPerTextArr[i].text = PlayerPropertyConfig.GetValueDescription(config.AddAttrType[i], config.AddAttrType[i]); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e631511e7fa941d44911d5d592beb0ad |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using UnityEngine;
|
| | |
|
| | | public class OfficialRankManager : GameSystemManager<OfficialRankManager>
|
| | | {
|
| | | bool redpointDirty = false;
|
| | |
|
| | | #region 官职任务
|
| | | //当前官职的任务状态
|
| | | int taskAwardState;
|
| | | Dictionary<int, int> taskValues = new Dictionary<int, int>();
|
| | | public Dictionary<int, int[]> realMissionGuides = new Dictionary<int, int[]>();
|
| | | public event Action RealmMissionRefreshEvent;
|
| | |
|
| | | public Dictionary<int, int> mainLevelDict = new Dictionary<int, int>(); //id:索引 用于判断还需多少关
|
| | | public override void Init()
|
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
|
| | | BlessLVManager.Instance.OnBlessLVUpdateEvent += UpdateRedpoint;
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitialize;
|
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += UpdateRedpoint;
|
| | |
|
| | |
|
| | | var levelList = MainLevelConfig.GetKeys().ToList();
|
| | | levelList.Sort();
|
| | | for (int i = 0; i < levelList.Count; i++)
|
| | | { |
| | | mainLevelDict[levelList[i]] = i;
|
| | | }
|
| | | }
|
| | |
|
| | | public override void Release()
|
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
|
| | | BlessLVManager.Instance.OnBlessLVUpdateEvent -= UpdateRedpoint;
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= BeforePlayerDataInitialize;
|
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= UpdateRedpoint;
|
| | | }
|
| | |
|
| | | void BeforePlayerDataInitialize()
|
| | | {
|
| | | taskValues.Clear();
|
| | | taskAwardState = 0;
|
| | | }
|
| | |
|
| | |
|
| | | void PlayerDataRefresh(PlayerDataType type)
|
| | | {
|
| | | if (type == PlayerDataType.LV ||
|
| | | type == PlayerDataType.ExAttr1
|
| | | )
|
| | | {
|
| | | //等级 通关
|
| | | UpdateRedpoint();
|
| | | }
|
| | | else if (type == PlayerDataType.RealmLevel)
|
| | | {
|
| | | if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin)
|
| | | return;
|
| | | //升级成功表现
|
| | | if (!UIManager.Instance.IsOpened<OfficialLVUPSuccessWin>())
|
| | | {
|
| | | UIManager.Instance.OpenWindow<OfficialLVUPSuccessWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | // 返回服务端的记录任务奖励状态 0未领取 1已领取
|
| | | public int GetMissionAwardState(int id)
|
| | |
| | | return (taskAwardState & (int)Math.Pow(2, id)) != 0 ? 1 : 0;
|
| | | }
|
| | |
|
| | | //任务类型 任务说明 所需值
|
| | | // 1 等级达到x级 x级
|
| | | // 2 通关x地图x层 地图ID|层 |
| | | // 3 消耗战锤 x个
|
| | |
|
| | | // 2 通过主线关卡 关卡ID |
| | | // 3 消耗战锤 x个 (仅通知这个)
|
| | | // 4 祝福树 等级 |
| | | //客户端显示的任务状态 0 代表进行中 1 代表可领取 2 代表已领取
|
| | | public int GetMissionState(int realm, int missionID)
|
| | | {
|
| | | var id = RealmLVUPTaskConfig.GetID(realm, missionID);
|
| | | var config = RealmLVUPTaskConfig.Get(id);
|
| | | var config = RealmLVUPTaskConfig.GetID(realm, missionID);
|
| | | var type = config.TaskType;
|
| | |
|
| | | if (GetMissionAwardState(missionID) == 1)
|
| | |
| | | case 1:
|
| | | return PlayerDatas.Instance.baseData.LV >= config.NeedValueList[0] ? 1 : 0;
|
| | | case 2:
|
| | | if (config.NeedValueList[0] == 0)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | return 0;
|
| | | //策划配置关卡ID为201,即 过关2-1(0/1) ,使用 ExAttr1 值判断,如ExAttr1值为20103代表当前已经过了第2章第1关第3波,包含了波,需要击败该关卡boss后才算该关过关
|
| | | return PlayerDatas.Instance.baseData.ExAttr1 / 100 > config.NeedValueList[0] ? 1 : 0;
|
| | | case 3:
|
| | | return taskValues.ContainsKey(missionID) && taskValues[missionID] >= config.NeedValueList[0] ? 1 : 0;
|
| | | |
| | | |
| | | case 4:
|
| | | return BlessLVManager.Instance.m_TreeLV >= config.NeedValueList[0] ? 1 : 0;
|
| | |
|
| | | default:
|
| | | return 0;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public int GetMissionProcess(int id)
|
| | | public void GetMissionProcess(int id, out int process, out int total)
|
| | | {
|
| | | if (taskValues.ContainsKey(id))
|
| | | var config = RealmLVUPTaskConfig.GetID(PlayerDatas.Instance.baseData.realmLevel, id);
|
| | | var type = config.TaskType;
|
| | | process = 1;
|
| | | total = 1;
|
| | | switch (type)
|
| | | {
|
| | | return taskValues[id];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | //type: 1等级 2通关 3消耗战锤
|
| | |
|
| | | public void RealMissionGuide(int type, int id = 0)
|
| | | {
|
| | | if (realMissionGuides.ContainsKey(type))
|
| | | {
|
| | | |
| | | int guideIndex = 0;
|
| | | if (type == 1)
|
| | | {
|
| | | |
| | | }
|
| | | else if (type == 2)
|
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen(164, true))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | else if (type == 3)
|
| | | {
|
| | | if (FuncOpen.Instance.IsFuncOpen(108))
|
| | | {
|
| | | guideIndex = 1;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | //NewBieCenter.Instance.StartNewBieGuideEx(guideID);
|
| | | case 1:
|
| | | process = PlayerDatas.Instance.baseData.LV;
|
| | | total = config.NeedValueList[0];
|
| | | break;
|
| | | case 2:
|
| | | process = PlayerDatas.Instance.baseData.ExAttr1 / 100 > config.NeedValueList[0] ? 1 : 0;
|
| | | total = 1;
|
| | | break;
|
| | | case 3:
|
| | | process = taskValues.ContainsKey(id) ? taskValues[id] : 0;
|
| | | total = config.NeedValueList[0];
|
| | | break;
|
| | | case 4:
|
| | | process = BlessLVManager.Instance.m_TreeLV;
|
| | | total = config.NeedValueList[0];
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | public void RequestAllAwards()
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | RealmMissionRefreshEvent?.Invoke();
|
| | | redpointDirty = true;
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | Redpoint redpoint = new Redpoint(MainRedDot.RedPoint_OfficialKey);
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | redpoint.state = RedPointState.None;
|
| | |
|
| | | var ids = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
|
| | | bool finish = true;
|
| | | foreach (var id in ids)
|
| | | {
|
| | | if (GetMissionAwardState(id) != 1)
|
| | | {
|
| | | if (GetMissionState(PlayerDatas.Instance.baseData.realmLevel, id) == 1)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | }
|
| | |
|
| | | finish = false;
|
| | | }
|
| | | }
|
| | | |
| | | if (finish)
|
| | | redpoint.state = RedPointState.Simple;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | public Color GetOfficialRankColor(int quality)
|
| | | {
|
| | |
|
| | | switch (quality)
|
| | | {
|
| | | case 1:
|
| | | // bbbbbb
|
| | | return new Color32(187, 187, 187, 255);
|
| | | case 2:
|
| | | // ffffff
|
| | | return new Color32(255, 255, 255, 255);
|
| | | case 3:
|
| | | // bbd5ff
|
| | | return new Color32(187, 213, 255, 255);
|
| | | case 4:
|
| | | // e4bbfe
|
| | | return new Color32(228, 187, 254, 255);
|
| | | case 5:
|
| | | // f7eba4
|
| | | return new Color32(247, 235, 164, 255);
|
| | | case 6:
|
| | | // ffc096
|
| | | return new Color32(255, 192, 150, 255);
|
| | | case 7:
|
| | | // fe9896
|
| | | return new Color32(254, 152, 150, 255);
|
| | | case 8:
|
| | | // ffaffe
|
| | | return new Color32(255, 174, 254, 255);
|
| | | case 9:
|
| | | // ffefcl
|
| | | return new Color32(255, 239, 203, 255);
|
| | | case 10:
|
| | | // e9fffa
|
| | | return new Color32(233, 255, 250, 255);
|
| | | case 11:
|
| | | // f5ddff
|
| | | return new Color32(245, 221, 255, 255);
|
| | | case 12:
|
| | | // b3fcfe
|
| | | return new Color32(179, 252, 254, 255);
|
| | | case 13:
|
| | | // ffd0f7
|
| | | return new Color32(255, 208, 247, 255);
|
| | | }
|
| | | return Color.white;
|
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | /// <summary> |
| | | /// 官职任务 |
| | | /// </summary> |
| | | public class OfficialUpCell : MonoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Text stateName; |
| | | [SerializeField] Image stateImg; |
| | | [SerializeField] Image bgImg; |
| | | [SerializeField] Image finishImg; |
| | | [SerializeField] Image getAwardImg; |
| | | [SerializeField] Text taskName; |
| | | [SerializeField] Image taskProcess; |
| | | [SerializeField] Text taskProcessText; |
| | | [SerializeField] ItemCell taskReward; |
| | | [SerializeField] Button getBtn; |
| | | |
| | | |
| | | public void Display(int id) |
| | | { |
| | | var config = RealmLVUPTaskConfig.GetID(PlayerDatas.Instance.baseData.realmLevel, id); |
| | | var state = OfficialRankManager.Instance.GetMissionState(PlayerDatas.Instance.baseData.realmLevel, id); |
| | | stateName.text = Language.Get("L1129_" + state); |
| | | stateImg.SetSprite("OfficialMisionState" + state); |
| | | finishImg.SetActive(state == 2); |
| | | getAwardImg.SetActive(state == 1); |
| | | bgImg.SetSprite(state == 0 ? "OfficialMissionBG0" : "OfficialMissionBG1"); |
| | | switch (config.TaskType) |
| | | { |
| | | case 1: |
| | | case 3: |
| | | case 4: |
| | | taskName.text = Language.Get("OfficialMission" + config.TaskType, config.NeedValueList[0]); |
| | | break; |
| | | case 2: |
| | | var mainLVConfig = MainLevelConfig.Get(config.NeedValueList[0]); |
| | | taskName.text = Language.Get("OfficialMission2", mainLVConfig.ChapterID, mainLVConfig.LevelNum); |
| | | break; |
| | | } |
| | | int process; |
| | | int total; |
| | | OfficialRankManager.Instance.GetMissionProcess(id, out process, out total); |
| | | taskProcess.fillAmount = (float)process / total; |
| | | taskProcessText.text = process + "/" + total; |
| | | int itemID = config.AwardItemList[0][0]; |
| | | taskReward.Init(new ItemCellModel(itemID, false, config.AwardItemList[0][1])); |
| | | taskReward.button.AddListener(() => |
| | | { |
| | | ItemTipUtility.Show(itemID); |
| | | }); |
| | | |
| | | getBtn.AddListener(() => |
| | | { |
| | | if (state != 1) |
| | | return; |
| | | OfficialRankManager.Instance.RequestAllAwards(); |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e58cf79fdccd0d54093f13a7cbf9868d |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using DG.Tweening; |
| | | using System; |
| | | |
| | | /// <summary> |
| | | /// 官职 |
| | | /// </summary> |
| | | public class OfficialUpWin : UIBase |
| | | { |
| | | [SerializeField] Text officialNameText; |
| | | [SerializeField] Text officialNextNameText; |
| | | [SerializeField] Image officialIcon; |
| | | [SerializeField] Image officialNextIcon; |
| | | [SerializeField] Button closeBtn; |
| | | [SerializeField] PositionTween[] paopaoArr; |
| | | [SerializeField] Text[] paopaoTextArrName; |
| | | [SerializeField] Text[] paopaoTextArrValue; |
| | | [SerializeField] OfficialUpCell[] missionCellArr; |
| | | [SerializeField] ButtonEx lvUpBtn; |
| | | [SerializeField] UIEffectPlayer effectPlayer; |
| | | |
| | | protected override void InitComponent() |
| | | { |
| | | closeBtn.AddListener(CloseWindow); |
| | | lvUpBtn.AddListener(OnLvUp); |
| | | } |
| | | |
| | | // 1 等级达到x级 x级 |
| | | // 2 通过主线关卡 关卡ID |
| | | // 3 消耗战锤 x个 |
| | | // 4 祝福树 等级 |
| | | protected override void OnPreOpen() |
| | | { |
| | | OfficialRankManager.Instance.RealmMissionRefreshEvent += Refresh; |
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh; |
| | | BlessLVManager.Instance.OnBlessLVUpdateEvent += RefreshBtn; |
| | | Refresh(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | OfficialRankManager.Instance.RealmMissionRefreshEvent -= Refresh; |
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh; |
| | | BlessLVManager.Instance.OnBlessLVUpdateEvent -= RefreshBtn; |
| | | } |
| | | |
| | | public override void Refresh() |
| | | { |
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel); |
| | | officialNameText.text = config.Name; |
| | | officialNameText.color = OfficialRankManager.Instance.GetOfficialRankColor(config.Quality); |
| | | officialIcon.SetSprite("OfficialRank" + PlayerDatas.Instance.baseData.realmLevel); |
| | | var nextConfig = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel + 1); |
| | | officialNextNameText.text = nextConfig.Name; |
| | | officialNextNameText.color = OfficialRankManager.Instance.GetOfficialRankColor(nextConfig.Quality); |
| | | officialNextIcon.SetSprite("OfficialRank" + (PlayerDatas.Instance.baseData.realmLevel + 1)); |
| | | for (int i = 0; i < paopaoArr.Length; i++) |
| | | { |
| | | paopaoArr[i].Play(); |
| | | paopaoTextArrName[i].text = PlayerPropertyConfig.Get(nextConfig.AddAttrType[i]).Name; |
| | | paopaoTextArrValue[i].text = "+" + PlayerPropertyConfig.GetValueDescription(nextConfig.AddAttrType[i], nextConfig.AddAttrNum[i]); |
| | | } |
| | | |
| | | RefreshBtn(); |
| | | } |
| | | |
| | | |
| | | void OnLvUp() |
| | | { |
| | | var ids = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel); |
| | | foreach (var id in ids) |
| | | { |
| | | if (OfficialRankManager.Instance.GetMissionAwardState(id) != 1) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("OfficialTask1"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | //所有泡泡飞向按钮 |
| | | for (int i = 0; i < paopaoArr.Length; i++) |
| | | { |
| | | paopaoArr[i].Stop(); |
| | | paopaoArr[i].transform.DOLocalMove(lvUpBtn.transform.localPosition, 0.4f); |
| | | } |
| | | effectPlayer.onComplete = () => |
| | | { |
| | | CA523_tagCMRealmLVUp pak = new CA523_tagCMRealmLVUp(); |
| | | GameNetSystem.Instance.SendInfo(pak); |
| | | }; |
| | | effectPlayer.Play(); |
| | | } |
| | | |
| | | |
| | | void RefreshBtn() |
| | | { |
| | | var ids = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel); |
| | | for (int i = 0; i < missionCellArr.Length; i++) |
| | | { |
| | | missionCellArr[i].Display(ids[i]); |
| | | } |
| | | |
| | | for (int i = 0; i < missionCellArr.Length; i++) |
| | | { |
| | | if (OfficialRankManager.Instance.GetMissionAwardState(i + 1) != 1) |
| | | { |
| | | lvUpBtn.SetColorful(null, false); |
| | | return; |
| | | } |
| | | } |
| | | lvUpBtn.SetColorful(null, true); |
| | | } |
| | | |
| | | |
| | | void PlayerDataRefresh(PlayerDataType type) |
| | | { |
| | | if (type == PlayerDataType.RealmLevel) |
| | | { |
| | | Refresh(); |
| | | } |
| | | else if (type == PlayerDataType.LV || |
| | | type == PlayerDataType.ExAttr1 |
| | | ) |
| | | { |
| | | //等级 通关 |
| | | RefreshBtn(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3c74d5be428f2324e910c232fb4e414b |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public Redpoint redPointBagFunc = new Redpoint(RedPoint_MainPackKey, RedPoint_BagFuncKey);
|
| | | #endregion
|
| | |
|
| | |
|
| | | //官职
|
| | | public const int RedPoint_OfficialKey = 101;
|
| | |
|
| | |
|
| | | #region 仙盟公用红点
|
| | |
| | | WarehouseLV = 99, //仓库等级 99 |
| | | EquipShowSwitch = 100, //装备显隐开关 100 |
| | | LuckValue = 101, //幸运值 101 |
| | | ExAttr1 = 102, //扩展属性1 102魔仆伤害24 |
| | | ExAttr2 = 103, //扩展属性2 103组队是否需要审核 |
| | | ExAttr1 = 102, //扩展属性1 102 主线已通关关卡 |
| | | ExAttr2 = 103, //扩展属性2 103 主线当前刷怪所在章节关卡记录 |
| | | ExAttr3 = 104, //扩展属性3 104元素攻击26 |
| | | ExAttr4 = 105, //扩展属性4 105元素防御27 |
| | | ExAttr5 = 106, //扩展属性5 106 |
| | |
| | | { |
| | | return string.Empty; |
| | | } |
| | | return GetRealmColorByLv(realmLv, config.Name, bright); |
| | | return AppendColor(realmLv, config.Name, bright); |
| | | } |
| | | |
| | | //strFormat附加 境界名以外的文字 |
| | |
| | | // return GetRealmColorByLv(realmLv, string.Format(strFormat, config.Name), bright); |
| | | // } |
| | | |
| | | public static string GetRealmColorByLv(int realmLv, string msg, bool bright = true) |
| | | { |
| | | var config = RealmConfig.Get(realmLv); |
| | | if (config == null) |
| | | { |
| | | return string.Empty; |
| | | } |
| | | switch (config.Quality) |
| | | { |
| | | case 1: |
| | | return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>"); |
| | | case 2: |
| | | return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>"); |
| | | case 3: |
| | | return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>"); |
| | | case 4: |
| | | return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>"); |
| | | case 5: |
| | | return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>"); |
| | | case 6: |
| | | return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>"); |
| | | default: |
| | | return msg; |
| | | } |
| | | } |
| | | // public static string GetRealmColorByLv(int realmLv, string msg, bool bright = true) |
| | | // { |
| | | // var config = RealmConfig.Get(realmLv); |
| | | // if (config == null) |
| | | // { |
| | | // return string.Empty; |
| | | // } |
| | | // switch (config.Quality) |
| | | // { |
| | | // case 1: |
| | | // return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>"); |
| | | // case 2: |
| | | // return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>"); |
| | | // case 3: |
| | | // return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>"); |
| | | // case 4: |
| | | // return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>"); |
| | | // case 5: |
| | | // return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>"); |
| | | // case 6: |
| | | // return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>"); |
| | | // default: |
| | | // return msg; |
| | | // } |
| | | // } |
| | | |
| | | //物品 各功能品质 从精良1品质 对应 3开始 |
| | | /// <summary> |