Merge remote-tracking branch 'origin/master' into Skill_Polymorph_BeatBackPlayer
1 文件已重命名
63个文件已修改
3个文件已删除
6 文件已复制
7个文件已添加
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 02, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class NPCConfig : ConfigBase {
|
| | |
|
| | | public int NPCID { get ; private set ; }
|
| | |
| | | public int LifeBarCount { get ; private set ; }
|
| | | public int NPCEffect { get ; private set ; }
|
| | | public int NPCSpeakID { get ; private set ; }
|
| | | |
| | | public int ClientRealm { get ; private set ; }
|
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return NPCID.ToString();
|
| | | } |
| | | |
| | | public override void Parse() { |
| | | }
|
| | |
|
| | | public override void Parse() {
|
| | | try
|
| | | {
|
| | | NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
| | | NPCEffect=IsNumeric(rawContents[55]) ? int.Parse(rawContents[55]):0;
|
| | |
|
| | | NPCSpeakID=IsNumeric(rawContents[56]) ? int.Parse(rawContents[56]):0;
|
| | | |
| | | ClientRealm=IsNumeric(rawContents[57]) ? int.Parse(rawContents[57]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1862c84997887d142ab127719c4d5c7f |
| | | timeCreated: 1533189772 |
| | | timeCreated: 1534744183 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 02, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class TrialExchangeConfig : ConfigBase {
|
| | |
|
| | | public int id { get ; private set ; }
|
| | | public int exchangeItemID { get ; private set ; }
|
| | | public int[] exchangeItemID;
|
| | | public int exchangeItemCount { get ; private set ; }
|
| | | public int exchangeItemIsBind { get ; private set ; }
|
| | | public int tokenId { get ; private set ; }
|
| | | public int tokenCount { get ; private set ; }
|
| | | public string description { get ; private set; }
|
| | | |
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return id.ToString();
|
| | | } |
| | | |
| | | public override void Parse() { |
| | | }
|
| | |
|
| | | public override void Parse() {
|
| | | try
|
| | | {
|
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
|
| | | exchangeItemID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | string[] exchangeItemIDStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | exchangeItemID = new int[exchangeItemIDStringArray.Length]; |
| | | for (int i=0;i<exchangeItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(exchangeItemIDStringArray[i],out exchangeItemID[i]); |
| | | }
|
| | |
|
| | | exchangeItemCount=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
|
| | |
|
| | |
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95c6c6944c394ac4381e86d9ce3006fb |
| | | timeCreated: 1533192458 |
| | | timeCreated: 1534744580 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class TrialRewardsConfig : ConfigBase {
|
| | |
|
| | | public int id { get ; private set ; }
|
| | | public int lineId { get ; private set ; }
|
| | | public int grade { get ; private set ; }
|
| | | public int[] rewards;
|
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return id.ToString();
|
| | | }
|
| | |
|
| | | public override void Parse() {
|
| | | try
|
| | | {
|
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | lineId=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | grade=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | string[] rewardsStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewards = new int[rewardsStringArray.Length]; |
| | | for (int i=0;i<rewardsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardsStringArray[i],out rewards[i]); |
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Role/RolePoint.cs.meta
copy to Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: ee2212e198950744b9c7524b9d74d042 |
| | | timeCreated: 1534748051 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | AddAsyncTask<AllPeoplePartyAwardConfig>();
|
| | | AddAsyncTask<OrderInfoConfig>();
|
| | | AddAsyncTask<TrialExchangeConfig>();
|
| | | AddAsyncTask<TrialRewardsConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | |
| | | StartSyncTask<IconConfig>(AssetPath.ResourceOut);
|
| | | StartSyncTask<SysInfoConfig>(AssetPath.ResourceOut);
|
| | | StartSyncTask<LanguageConfig>(AssetPath.ResourceOut);
|
| | | StartSyncTask<RealmConfig>(AssetPath.ResourceOut);
|
| | | }
|
| | |
|
| | | public bool AllCompleted()
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.FreePoint:
|
| | | baseData.FreePoint = value;
|
| | | ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint();
|
| | | break;
|
| | | case PlayerDataRefresh.FreeSkillPoint:
|
| | | baseData.FreeSkillPoint = value;
|
| | |
| | | SettingEffectMgr.Instance.Begin();
|
| | |
|
| | | DEBUG_STEP = 4; |
| | | ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint(); |
| | | QuickSetting.Instance.SetQuickSetting(vNetData.Setting); |
| | | NetLinkWin.Hide(); |
| | | WindowCenter.Instance.Close<SelectRoleWin>(); |
| | |
| | | public static readonly string controllerSuffix = "AnimatorController_"; |
| | | public static readonly string controllerUISuffix = "AnimatorController_UI_"; |
| | | public static readonly string controllerShowSuffix = "AnimatorController_Show_"; |
| | | public static readonly string controllerRealmSuffix = "AnimatorController_Realm_"; |
| | | |
| | | public static AnimationClip LoadAnimationClip(string name, string clipName) |
| | | { |
| | |
| | | return;
|
| | | }
|
| | |
|
| | | m_HeadUpName.SetRealm(_realm);
|
| | | m_HeadUpName.SetPlayerRealm(_realm);
|
| | | }
|
| | |
|
| | | public void SwitchTitle(uint titleID)
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Saturday, January 20, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | | using TableConfig;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class RealmBetterEquipModel : Model, IBeforePlayerDataInitialize, ISwitchAccount,IPlayerLoginOk
|
| | | {
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
|
| | |
|
| | | public string currentEquipGuid { get; private set; }
|
| | |
|
| | | Dictionary<string, ItemModel> betterEquipModels = new Dictionary<string, ItemModel>();
|
| | |
|
| | | public event Action showEquipRefreshEvent;
|
| | | public const string RealmRecordKey = "RealmRecord";
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | playerPack.RefreshPackAct += OnPackageRefresh;
|
| | | playerPack.RefreshItemCountAct += OnPackageItemRefresh;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {;
|
| | | playerPack.RefreshPackAct -= OnPackageRefresh;
|
| | | playerPack.RefreshItemCountAct -= OnPackageItemRefresh;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | currentEquipGuid = string.Empty;
|
| | | betterEquipModels.Clear();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | LocalSave.SetInt(RealmRecordKey,PlayerDatas.Instance.baseData.realmLevel);
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= RefreshRealm;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshRealm;
|
| | | }
|
| | |
|
| | | public void OnSwitchAccount()
|
| | | {
|
| | | currentEquipGuid = string.Empty;
|
| | | }
|
| | |
|
| | | private void RefreshRealm(PlayerDataRefresh type)
|
| | | {
|
| | | int realmLv = PlayerDatas.Instance.baseData.realmLevel;
|
| | | if (type != PlayerDataRefresh.OfficialRank
|
| | | || LocalSave.GetInt(RealmRecordKey) == realmLv
|
| | | || NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | LocalSave.SetInt(RealmRecordKey,realmLv);
|
| | | Dictionary<int, ItemModel> pairs = modelInterface.CheckBetterEquipByRealm();
|
| | | betterEquipModels.Clear();
|
| | | currentEquipGuid = string.Empty;
|
| | | foreach (var model in pairs.Values)
|
| | | {
|
| | | betterEquipModels[model.itemInfo.ItemGUID] = model;
|
| | | currentEquipGuid = model.itemInfo.ItemGUID;
|
| | | }
|
| | | if (showEquipRefreshEvent != null)
|
| | | {
|
| | | showEquipRefreshEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetBetterEquip(string _guid, out ItemModel _equip)
|
| | | {
|
| | | return betterEquipModels.TryGetValue(_guid, out _equip);
|
| | | }
|
| | |
|
| | | public void ReportConfirmBetterEquip(string _guid)
|
| | | {
|
| | | betterEquipModels.Remove(_guid);
|
| | |
|
| | | var tempGuid = GetOneEquip();
|
| | | if (tempGuid != currentEquipGuid)
|
| | | {
|
| | | currentEquipGuid = tempGuid;
|
| | | if (showEquipRefreshEvent != null)
|
| | | {
|
| | | showEquipRefreshEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | private void OnPackageRefresh(PackType _packType)
|
| | | {
|
| | | if (_packType != PackType.rptItem)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var keys = new List<string>(betterEquipModels.Keys);
|
| | | for (int i = keys.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var guid = keys[i];
|
| | | var itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null || itemModel.packType != PackType.rptItem)
|
| | | {
|
| | | betterEquipModels.Remove(guid);
|
| | | }
|
| | | }
|
| | |
|
| | | var tempGuid = GetOneEquip();
|
| | | if (tempGuid != currentEquipGuid)
|
| | | {
|
| | | if (!string.IsNullOrEmpty(tempGuid))
|
| | | {
|
| | | currentEquipGuid = tempGuid;
|
| | | if (showEquipRefreshEvent != null)
|
| | | {
|
| | | showEquipRefreshEvent();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | currentEquipGuid = tempGuid;
|
| | | if (showEquipRefreshEvent != null)
|
| | | {
|
| | | showEquipRefreshEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnPackageItemRefresh(PackType _packType, int _index, int _itemId)
|
| | | {
|
| | | if (_packType == PackType.rptEquip)
|
| | | {
|
| | | //穿上装备的时候的处理
|
| | | var item = playerPack.GetItemModelByIndex(_packType, _index);
|
| | | if (item != null)
|
| | | {
|
| | | RemoveLowGradeItemByEquipPlace(_index, item.equipScore);
|
| | | }
|
| | | OnPackageRefresh(PackType.rptItem);
|
| | | }
|
| | | else if (_packType == PackType.rptItem)
|
| | | {
|
| | | OnPackageRefresh(_packType);
|
| | | }
|
| | | }
|
| | |
|
| | | private string GetOneEquip()
|
| | | {
|
| | | var guid = string.Empty;
|
| | | foreach (var key in betterEquipModels.Keys)
|
| | | {
|
| | | guid = key;
|
| | | break;
|
| | | }
|
| | |
|
| | | return guid;
|
| | | }
|
| | |
|
| | | private void RemoveItemByEquipPlace(int _place)
|
| | | {
|
| | | var place = _place == 10 ? 9 : _place;
|
| | | var keys = new List<string>(betterEquipModels.Keys);
|
| | | for (int i = keys.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var item = betterEquipModels[keys[i]];
|
| | | if (item != null && item.chinItemModel.EquipPlace == place)
|
| | | {
|
| | | betterEquipModels.Remove(keys[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RemoveLowGradeItemByEquipPlace(int _place, int _score)
|
| | | {
|
| | | var place = _place == 10 ? 9 : _place;
|
| | | var keys = new List<string>(betterEquipModels.Keys);
|
| | | for (int i = keys.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var item = betterEquipModels[keys[i]];
|
| | | if (item != null && item.chinItemModel.EquipPlace == place && item.equipScore <= _score)
|
| | | {
|
| | | betterEquipModels.Remove(keys[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private bool TryGetEquipByPlace(int _place, out ItemModel _itemModel)
|
| | | {
|
| | | var place = _place == 10 ? 9 : _place;
|
| | | var keys = new List<string>(betterEquipModels.Keys);
|
| | | for (int i = keys.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var item = betterEquipModels[keys[i]];
|
| | | if (item != null && item.chinItemModel.EquipPlace == place)
|
| | | {
|
| | | _itemModel = item;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | | _itemModel = null;
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
copy from System/Role/RolePoint.cs.meta
copy to System/BetterItemGet/RealmBetterEquipModel .cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: 368f012abd3595c419a67d33f44153ea |
| | | timeCreated: 1534755541 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | treasureRefineDict.Clear();
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= RefreshFuncOpenState;
|
| | | playerPack.RefreshItemCountAct -= RefreshMat;
|
| | | playerPack.ItemCntReduceAct -= RefreshDanReduce;
|
| | | playerPack.RefreshItemSumUseCntAct -= RefreshItemUsce;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= StoveUpgradAfterClose;
|
| | |
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | | playerPack.RefreshItemCountAct += RefreshMat;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += RefreshFuncOpenState;
|
| | | playerPack.RefreshItemSumUseCntAct += RefreshItemUsce;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += StoveUpgradAfterClose;
|
| | | playerPack.ItemCntReduceAct += RefreshDanReduce;
|
| | | }
|
| | |
|
| | | private void RefreshFuncOpenState(int funcId)
|
| | |
| | | /// 得到服务端的炼丹炉数据
|
| | | /// </summary>
|
| | | private int _stovelv = 1;
|
| | | private int preStoveLv = 1;
|
| | | public int StoveLV { get { return _stovelv; } } // 炼丹炉等级
|
| | | private int _stoveExp = 0;
|
| | | public int StoveExp { get { return _stoveExp; } } // 炼丹炉经验
|
| | | public int addExp = 0;
|
| | | public event Action RefreshStoveModelEvent;
|
| | | public int makerItemID { get; private set; }
|
| | |
|
| | | public bool StoveIsUpGrade { get; private set; }
|
| | | public void RefreshBlastFurnaceModel(HA3BF_tagMCPlayerStoveMsg data)
|
| | | {
|
| | | DebugEx.Log("RefreshBlastFurnaceModel");
|
| | |
| | | if(!isFirstGet)
|
| | | {
|
| | | isMakeDan = true;
|
| | | if(preStoveLv < data.StoveLV)
|
| | | {
|
| | | preStoveLv = data.StoveLV;
|
| | | StoveIsUpGrade = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | preStoveLv = data.StoveLV;
|
| | | StoveIsUpGrade = false;
|
| | | }
|
| | | PlayRecycleGuid();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if(makerItemID == 0 && addExp > 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("RecyclingElixir", addExp);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 判断炼丹炉是否升级
|
| | | /// </summary>
|
| | | private int preStoveLv = 1;
|
| | | public bool IsUpgrade(int stoveLv)
|
| | | {
|
| | | if (preStoveLv >= stoveLv)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | preStoveLv = stoveLv;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | CheckMakerDandrugCondition();
|
| | | CheckRecycleStoreRed();
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) return;
|
| | |
|
| | | List<ItemModel> itemModels = GetRecycleDanlist();
|
| | | if(itemModels != null && itemModels.Count > 0)
|
| | | if(IsRecycleDanDrug())
|
| | | {
|
| | | recycleBtnRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | |
| | | {
|
| | | recycleBtnRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsRecycleDanDrug()
|
| | | {
|
| | | List<ItemModel> itemModels = GetRecycleDanlist();
|
| | | if(itemModels != null && itemModels.Count > 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | |
|
| | | private void StoveUpgradAfterClose(Window win)
|
| | | {
|
| | | if (win.name != "StoveUpgradWin") return;
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | |
|
| | |
|
| | | private void RefreshDanReduce(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptItem || !playerPack.CheckIsDrugById(id)) return;
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | |
|
| | | public void PlayRecycleGuid()
|
| | | {
|
| | | if (IsRecycleDanDrug() |
| | | && !NewBieCenter.Instance.completeGuidesBuf.Contains(93)
|
| | | && !StoveIsUpGrade)
|
| | | {
|
| | | NewBieCenter.Instance.StartNewBieGuide(93);
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | _expValueText.text = Language.Get("L1055");
|
| | | }
|
| | | RefreshVirtualFill(_addExp);
|
| | | if (FurnaceModel.IsUpgrade(FurnaceModel.StoveLV))
|
| | | if (FurnaceModel.StoveIsUpGrade)
|
| | | {
|
| | | ActivateShow.StoveUpgrade(FurnaceModel.StoveLV);
|
| | | CreateCell();
|
| | |
| | | m_DogzIcon.SetSprite(_dogzCfg.HeadIcon);
|
| | | m_DogzIcon.SetNativeSize();
|
| | | var _dogzEquips = model.GetDogzEquips(_dogzCfg.ID);
|
| | | m_DogzIcon.material = (_dogzEquips == null || _dogzEquips.Count < 5) ? MaterialUtility.GetDefaultSpriteGrayMaterial() :
|
| | | MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | bool isActive = (_dogzEquips == null || _dogzEquips.Count < 5) ? false : true;
|
| | | m_DogzName.text = _dogzCfg.Name;
|
| | | //m_DogzGrade.text = StringUtility.Contact("评分:", 100);
|
| | | m_DogzGrade.text = StringUtility.Contact("评分:", 100);
|
| | | if (isActive)
|
| | | {
|
| | | m_DogzIcon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | m_DogzName.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | m_DogzGrade.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DogzIcon.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_DogzName.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_DogzGrade.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | }
|
| | | m_DogzBtn.image.color = model.presentSelectDogz == _dogzCfg.ID ? Color.blue : Color.white;
|
| | | m_DogzAssist.gameObject.SetActive(model.TryGetAssistDogzState(_dogzCfg.ID));
|
| | | m_DogzBtn.onClick.RemoveAllListeners();
|
| | |
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(model.itemId,false,(ulong)model.itemInfo.ItemCount,model.itemInfo.ItemPlace,
|
| | | model.itemInfo.IsBind,false,PackType.rptDogzEquip,model.itemInfo.ItemGUID);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | tipsModel.SetItemTipsModel(model.packType,model.itemInfo.ItemGUID,false,false);
|
| | | tipsModel.SetDogzEquipBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(model.itemId, false, (ulong)model.itemInfo.ItemCount, model.itemInfo.ItemPlace,
|
| | | model.itemInfo.IsBind, false, PackType.rptDogzItem, model.itemInfo.ItemGUID);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | tipsModel.SetItemTipsModel(model.packType, model.itemInfo.ItemGUID, false, false);
|
| | | tipsModel.SetDogzItemBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | AddAssistItem = int.Parse(_funcCfg.Numerical2);
|
| | | AddAssistItemCnt = ConfigParse.GetMultipleStr<int>(_funcCfg.Numerical3);
|
| | | m_DogzEquipStrenLimit = ConfigParse.GetDic<int, int>(_funcCfg.Numerical4);
|
| | | _funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzPack"); |
| | | _funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzPack");
|
| | | DogzPackGridCnt = int.Parse(_funcCfg.Numerical1);
|
| | | }
|
| | | /// <summary>
|
| | |
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(type, index);
|
| | | int dogzId = GetDogzIDByIndex(index);
|
| | | if (itemModel != null)
|
| | | List<ItemModel> modellist = GetDogzEquips(dogzId);
|
| | | if(modellist != null)
|
| | | {
|
| | | for (int i = 0; i < m_DogzEquipDict[dogzId].Count; i++)
|
| | | if (itemModel != null)
|
| | | {
|
| | | if (m_DogzEquipDict[dogzId][i].itemInfo.ItemPlace == index)
|
| | | bool isAdd = true;
|
| | | for (int i = 0; i < modellist.Count; i++)
|
| | | {
|
| | | m_DogzEquipDict[dogzId][i] = itemModel;
|
| | | return;
|
| | | if (modellist[i].itemInfo.ItemPlace == index)
|
| | | {
|
| | | isAdd = false;
|
| | | modellist[i] = itemModel;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if(isAdd)
|
| | | {
|
| | | modellist.Add(itemModel);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < modellist.Count; i++)
|
| | | {
|
| | | if (modellist[i].itemInfo.ItemPlace == index)
|
| | | {
|
| | | modellist.RemoveAt(i);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < m_DogzEquipDict[dogzId].Count; i++)
|
| | | if(itemModel != null)
|
| | | {
|
| | | if (m_DogzEquipDict[dogzId][i].itemInfo.ItemPlace == index)
|
| | | {
|
| | | m_DogzEquipDict[dogzId].RemoveAt(i);
|
| | | return;
|
| | | }
|
| | | List<ItemModel> equipDatas = new List<ItemModel>();
|
| | | equipDatas.Add(itemModel);
|
| | | m_DogzEquipDict.Add(dogzId,equipDatas);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | if(RefreshDogzEquipAct != null)
|
| | | {
|
| | |
| | | [SerializeField] Image m_BossRealm;
|
| | | [SerializeField] Text m_BossName;
|
| | |
|
| | | [SerializeField]
|
| | | ItemBehaviour[] m_RewardBehaviours;
|
| | | [SerializeField] TrialRewardsBehaviour[] m_RewardBehaviours;
|
| | | [SerializeField] ScrollRect m_RewardScroller;
|
| | |
|
| | | DungeonModel m_Model;
|
| | | DungeonModel model {
|
| | |
| | | }
|
| | |
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (npcConfig != null)
|
| | | {
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
|
| | | if (realmConfig != null)
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | m_BossRealm.SetSprite(realmConfig.Img);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_BossRealm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_BossName.text = npcConfig.charName;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void DrawRewards()
|
| | | {
|
| | | m_RewardScroller.verticalNormalizedPosition = 1;
|
| | | var dongeonId = model.DungeonMap(model.selectedTrialDungeon);
|
| | | var config = ConfigManager.Instance.GetTemplate<DungeonConfig>(dongeonId);
|
| | | var rewards = config.Rewards;
|
| | | for (int i = 0; i < m_RewardBehaviours.Length; i++)
|
| | | {
|
| | | var behaviour = m_RewardBehaviours[i];
|
| | | if (i < rewards.Length)
|
| | | int[] rewards = null;
|
| | | if (trialDungeonModel.TryGetTrialRewards(config.LineID, m_RewardBehaviours[i].grade, out rewards))
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.SetItem(rewards[i], 0);
|
| | | behaviour.Display(rewards);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | Dictionary<int, List<TrialExchangeConfig>> trialTokenExchangeDict = new Dictionary<int, List<TrialExchangeConfig>>();
|
| | | Dictionary<int, int> lineToTokenClassDict;
|
| | | Dictionary<int, Dictionary<int, int[]>> trialRewardDict = new Dictionary<int, Dictionary<int, int[]>>();
|
| | | public Dictionary<int, List<int>> trialClassTokens = new Dictionary<int, List<int>>();
|
| | | public List<int> trialTokens = new List<int>();
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
| | | }
|
| | | var funcConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("LineToItemStage");
|
| | | lineToTokenClassDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical1);
|
| | |
|
| | | var trialRewards = ConfigManager.Instance.GetAllValues<TrialRewardsConfig>();
|
| | | for (int i = 0; i < trialRewards.Count; i++)
|
| | | {
|
| | | Dictionary<int, int[]> dict = null;
|
| | | if (!trialRewardDict.TryGetValue(trialRewards[i].lineId, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, int[]>();
|
| | | trialRewardDict.Add(trialRewards[i].lineId, dict);
|
| | | }
|
| | | dict.Add(trialRewards[i].grade, trialRewards[i].rewards);
|
| | | }
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | public bool TryGetTrialExchanges(int lv, out List<TrialExchangeConfig> list)
|
| | | {
|
| | | return trialTokenExchangeDict.TryGetValue(lv, out list);
|
| | | }
|
| | |
|
| | | public bool TryGetTrialRewards(int lineId, int grade, out int[] rewards)
|
| | | {
|
| | | rewards = null;
|
| | | if (trialRewardDict.ContainsKey(lineId))
|
| | | {
|
| | | if (trialRewardDict[lineId].ContainsKey(grade))
|
| | | {
|
| | | rewards = trialRewardDict[lineId][grade];
|
| | | return rewards != null && rewards.Length > 0;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public List<int> GetTotalClass()
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetExchangeItemByJob(TrialExchangeConfig config)
|
| | | {
|
| | | if (config == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | if (config.exchangeItemID.Length == 1)
|
| | | {
|
| | | return config.exchangeItemID[0];
|
| | | }
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | if (job - 1 < config.exchangeItemID.Length && job - 1 >= 0)
|
| | | {
|
| | | return config.exchangeItemID[job - 1];
|
| | | }
|
| | | return config.exchangeItemID[0];
|
| | | }
|
| | |
|
| | | #region 红点
|
| | | void UpdateRedpoint()
|
| | | {
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(config));
|
| | | if (exchangeItemConfig.EquipPlace == 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | if (EquipCompare(config.exchangeItemID) == 1)
|
| | | if (EquipCompare(GetExchangeItemByJob(config)) == 1)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(list[i].exchangeItemID);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(list[i]));
|
| | | if (SatisfyExchangeBetter(list[i].id) && itemConfig.EquipPlace != 0)
|
| | | {
|
| | | _id = list[i].id;
|
| | |
| | | }
|
| | | m_Item.cellBtn.RemoveAllListeners();
|
| | | m_Item.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(config.exchangeItemID, true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
|
| | | m_Item.Init(cellModel);
|
| | | m_Item.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(config.exchangeItemID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | m_Description.text = config.description;
|
| | | m_Token.SetItem(config.tokenId, config.tokenCount);
|
| | | var count = model.GetTrialTokenCount(config.tokenId);
|
| | | m_Token.count.color = UIHelper.GetUIColor(count >= config.tokenCount ? TextColType.Green : TextColType.NavyBrown, true);
|
| | | var equipCompare = model.EquipCompare(config.exchangeItemID);
|
| | | var equipCompare = model.EquipCompare(model.GetExchangeItemByJob(config));
|
| | | m_Up.gameObject.SetActive(equipCompare == 1);
|
| | | m_Down.gameObject.SetActive(equipCompare == -1);
|
| | |
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(model.GetExchangeItemByJob(config));
|
| | | m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0));
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class TrialRewardsBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] int m_Grade;
|
| | | [SerializeField] ItemBehaviour[] m_ItemBehaviours;
|
| | |
|
| | | public int grade { get { return m_Grade; } }
|
| | |
|
| | | public void Display(int[] rewards)
|
| | | {
|
| | | for (int i = 0; i < m_ItemBehaviours.Length; i++)
|
| | | {
|
| | | var behaviour = m_ItemBehaviours[i];
|
| | | if (i < rewards.Length)
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.SetItem(rewards[i], 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | behaviour.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Dungeon/TrialRewardsBehaviour.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: f436f3dabd50bc5429d2de289d60fdd5 |
| | | timeCreated: 1534749125 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<BossHomeConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | |
|
| | | m_Participant.gameObject.SetActive(isUnLocked && findPreciousModel.IsBossAlive(bossId));
|
| | |
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossRebornCoolDown(isUnLocked);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossParticipant(bossId);
|
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<ElderGodAreaConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | |
|
| | | if (m_Realm != null)
|
| | | {
|
| | | if (_realm > 0)
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<PersonalBossConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<WorldBossConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | |
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossRebornCoolDown(isUnLocked);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | OnSelected(bossId);
|
| | |
| | | yield return null;
|
| | | if(itemAttrData.isCompare)
|
| | | {
|
| | | if (itemAttrData.packType != PackType.rptEquip)
|
| | | if (itemAttrData.packType != PackType.rptEquip
|
| | | && itemAttrData.packType != PackType.rptDogzEquip)
|
| | | {
|
| | | itemTipsModel.SetCurTips(this.GetComponent<RectTransform>());
|
| | | }
|
| | |
| | | ItemCellModel cellModel = new ItemCellModel(itemAttrData.itemId,itemAttrData.isPreview, (ulong)itemAttrData.count, itemAttrData.isBind,
|
| | | itemAttrData.guid,itemAttrData.packType,itemAttrData.isCompare, itemAttrData.useDataDict);
|
| | | itemCell.Init(cellModel);
|
| | | if(itemAttrData.packType == PackType.rptEquip)
|
| | | if(itemAttrData.packType == PackType.rptEquip
|
| | | || itemAttrData.packType == PackType.rptDogzEquip)
|
| | | {
|
| | | putOnIcon.SetActive(true);
|
| | | }
|
| | |
| | |
|
| | | if (itemAttrData.isCompare)
|
| | | {
|
| | | if(itemAttrData.packType != PackType.rptEquip)
|
| | | if(itemAttrData.packType != PackType.rptEquip
|
| | | && itemAttrData.packType != PackType.rptDogzEquip)
|
| | | {
|
| | | CreateFuncBtn();
|
| | | }
|
| | |
| | | get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
|
| | | }
|
| | |
|
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | m_storeModel.RefreshTCBPlayerDataEvent += RefreshOfflinePluginTime;
|
| | |
| | | switch (attrData.winType)
|
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
|
| | | break;
|
| | | case ItemWinType.wingsWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
|
| | | break;
|
| | | case ItemWinType.guardWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
|
| | | break;
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void SetDogzItemBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendSellQuest(ItemWinBtnType.sell, attrData); });
|
| | | }
|
| | |
|
| | | switch (attrData.winType)
|
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { dogzModel.SendPutOnEquip(dogzModel.presentSelectDogz, attrData.index); });
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetDogzEquipBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOff, (ItemWinBtnType, ItemAttrData) => {
|
| | | dogzModel.SendPutOffEquip(dogzModel.presentSelectDogz,dogzModel.GetDogzEquipPlaceByIndex(attrData.index));
|
| | | });
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.strength, (ItemWinBtnType, ItemAttrData) => {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc1);
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置仓库弹框按钮
|
| | | /// </summary>
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class PackModelInterface : Model, IBeforePlayerDataInitialize
|
| | | public class PackModelInterface : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | private ItemConfig tagChinModel;
|
| | | private FuncConfigConfig _equipGSFormula;
|
| | |
| | | itemEffectCDDict.Clear();
|
| | | itemEffectTimelist.Clear();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | int startLockIndex = singlePack.openGridCount - GetInitGridCount(PackType.rptItem);
|
| | | int startLockIndex = singlePack.openGridCount - playerPack.InitBagGridCnt;
|
| | | FuncConfigConfig _tagFuncModel = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("OpenBagItem");
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,itemId);
|
| | | Equation.Instance.Clear();
|
| | |
| | | RefreshPickItemEvent(type,guid);
|
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, ItemModel> RealmBetterDict = new Dictionary<int, ItemModel>();
|
| | | public Dictionary<int, ItemModel> CheckBetterEquipByRealm()
|
| | | {
|
| | | RealmBetterDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null) return RealmBetterDict;
|
| | |
|
| | | int realmLv = PlayerDatas.Instance.baseData.realmLevel;
|
| | | Dictionary<int,ItemModel> pairs = singlePack.GetPackModelIndexDict();
|
| | | foreach(var model in pairs.Values)
|
| | | {
|
| | | if(model.chinItemModel.EquipPlace > 0
|
| | | && model.chinItemModel.EquipPlace != (int)RoleEquipType.retSpiritAnimal
|
| | | && model.chinItemModel.RealmLimit <= realmLv
|
| | | && !IsOverdue(model.itemInfo.ItemGUID,model.itemId,model.useDataDict)
|
| | | && IsFightUp(model.itemId,model.equipScore) == 1)
|
| | | {
|
| | | if(!RealmBetterDict.ContainsKey(model.EquipPlace))
|
| | | {
|
| | | RealmBetterDict.Add(model.EquipPlace,model);
|
| | | }
|
| | | else
|
| | | {
|
| | | if(model.equipScore > RealmBetterDict[model.EquipPlace].equipScore)
|
| | | {
|
| | | RealmBetterDict[model.EquipPlace] = model;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return RealmBetterDict;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 解锁格子
|
| | |
|
| | | public int GetInitGridCount(PackType type)
|
| | | {
|
| | | FuncConfigConfig initGridCount = null;
|
| | | if (type == PackType.rptItem)
|
| | | initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitBagCellCount");
|
| | | else if (type == PackType.rptWarehouse)
|
| | | initGridCount = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitDepotCellCount");
|
| | |
|
| | | return int.Parse(initGridCount.Numerical1);
|
| | | }
|
| | |
|
| | | public void OpenGrid(int chooseGridCount, PackType type)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(type);
|
| | | int openCount = chooseGridCount - singlePack.openGridCount;
|
| | | int index = chooseGridCount - GetInitGridCount(type);
|
| | | int index = 0;
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptItem:
|
| | | index = chooseGridCount - playerPack.InitBagGridCnt;
|
| | | break;
|
| | | case PackType.rptWarehouse:
|
| | | index = chooseGridCount - playerPack.InitDepotGridCnt;
|
| | | break;
|
| | | }
|
| | | itemTipsModel.SetExtendGirdModel(openCount,index, type);
|
| | | WindowCenter.Instance.Open<ExtendWin>();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | #region 发送穿戴装备的请求
|
| | | RolePointModel _rolePointModel;
|
| | | RolePointModel rolePointModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>());
|
| | | }
|
| | | }
|
| | | ItemConfig sendItemConfig = null;
|
| | | ItemModel sendItemModel = null;
|
| | | int itemIndex = -1;
|
| | |
| | | foreach (var key in sumOffsetlist.Keys)
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshFreePoint;
|
| | | rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
|
| | | //rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | if (useItemModel.itemId == 951)
|
| | | {
|
| | | int startLockIndex = singlePack.openGridCount - modelInterface.GetInitGridCount(PackType.rptItem);
|
| | | int startLockIndex = singlePack.openGridCount - playerPack.InitBagGridCnt;
|
| | | int chooseGridCnt = singlePack.openGridCount + GetExtendGridCnt(startLockIndex);
|
| | | modelInterface.OpenGrid(chooseGridCnt, PackType.rptItem);
|
| | | return;
|
| | |
| | | {
|
| | | extendCnt = 1;
|
| | | }
|
| | | int remianLock = playerPack.MaxBagGridCnt - playerPack.GetSinglePackModel(PackType.rptItem).openGridCount;
|
| | | if(extendCnt > remianLock)
|
| | | {
|
| | | extendCnt = remianLock;
|
| | | }
|
| | | return extendCnt;
|
| | | }
|
| | | }
|
| | |
| | | public Dictionary<int, Dictionary<int, int>> decomposeAttrDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | public static string StrengthAttrShift_RecordKey = "StrengthAttrShift";
|
| | | public const string RecordKnapsackTitle = "RecordKnapsackTitle";
|
| | | public int MaxBagGridCnt { get; private set; }
|
| | | public int InitBagGridCnt { get; private set; }
|
| | | public int MaxDepotGridCnt { get; private set; }
|
| | | public int InitDepotGridCnt { get; private set; }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | List<DungeonOpenTimeConfig> dungeonlist = ConfigManager.Instance.GetAllValues<DungeonOpenTimeConfig>();
|
| | |
| | | minDecomposeNum = int.Parse(equipDecompose.Numerical1);
|
| | | defaultUnSelectlist = ConfigParse.GetMultipleStr<int>(equipDecompose.Numerical2);
|
| | |
|
| | | InitDepotGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitDepotCellCount").Numerical1);
|
| | | InitBagGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("InitBagCellCount").Numerical1);
|
| | | MaxBagGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MaxBagCellCount").Numerical1);
|
| | | MaxDepotGridCnt = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MaxDepotCellCount").Numerical1);
|
| | |
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class WashAttrPointWin : Window |
| | | { |
| | | [SerializeField] Toggle strenToggle; //力量 |
| | | [SerializeField] Toggle agilityToggle; //身法 |
| | | [SerializeField] Toggle physiqueToggle; //体质 |
| | | [SerializeField] Toggle mentAlityToggle; //灵力 |
| | | [SerializeField] Button closeBtn; |
| | | [SerializeField] Button okBtn; |
| | | [SerializeField] Text washAttrDesText; |
| | | |
| | | PlayerPackModel _playerPack; |
| | | PlayerPackModel playerPack |
| | | { |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } |
| | | } |
| | | |
| | | RolePointModel _rolePointModel; |
| | | RolePointModel rolePointModel |
| | | { |
| | | get |
| | | { |
| | | return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>()); |
| | | } |
| | | } |
| | | |
| | | public static ItemModel itemModel = null; |
| | | private ItemConfig itemConfig = null; |
| | | private AttrEnum selectAttr = AttrEnum.POWER; |
| | | |
| | | float washPoint = 0; |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void BindController() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | washPoint = 0; |
| | | strenToggle.isOn = true; |
| | | agilityToggle.isOn = false; |
| | | physiqueToggle.isOn = false; |
| | | mentAlityToggle.isOn = false; |
| | | strenToggle.onValueChanged.AddListener((bool isOn)=> { OnClickToggle(isOn); }); |
| | | agilityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); }); |
| | | physiqueToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); }); |
| | | mentAlityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); }); |
| | | closeBtn.AddListener(CloseWin); |
| | | okBtn.AddListener(ClickSureBtn); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | InitUI(); |
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | closeBtn.RemoveAllListeners(); |
| | | strenToggle.RemoveAllListeners(); |
| | | agilityToggle.RemoveAllListeners(); |
| | | physiqueToggle.RemoveAllListeners(); |
| | | mentAlityToggle.RemoveAllListeners(); |
| | | okBtn.RemoveAllListeners(); |
| | | } |
| | | protected override void OnAfterClose() |
| | | { |
| | | |
| | | } |
| | | |
| | | private void InitUI() |
| | | { |
| | | if (itemModel == null) return; |
| | | |
| | | itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel.itemId); |
| | | SetCurWashAttr(); |
| | | RefreshWashAttrDes(); |
| | | } |
| | | |
| | | private void OnClickToggle(bool isOn) |
| | | { |
| | | SetCurWashAttr(); |
| | | RefreshWashAttrDes(); |
| | | } |
| | | |
| | | private void SetCurWashAttr() |
| | | { |
| | | if (strenToggle.isOn) |
| | | { |
| | | selectAttr = AttrEnum.POWER; |
| | | } |
| | | else if (agilityToggle.isOn) |
| | | { |
| | | selectAttr = AttrEnum.AGILITY; |
| | | } |
| | | else if (physiqueToggle.isOn) |
| | | { |
| | | selectAttr = AttrEnum.PHYSIQUE; |
| | | } |
| | | else if (mentAlityToggle.isOn) |
| | | { |
| | | selectAttr = AttrEnum.MENTALITY; |
| | | } |
| | | } |
| | | |
| | | private void RefreshWashAttrDes() |
| | | { |
| | | float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr]; |
| | | switch (selectAttr) |
| | | { |
| | | case AttrEnum.POWER: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint; |
| | | break; |
| | | case AttrEnum.AGILITY: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint; |
| | | break; |
| | | case AttrEnum.PHYSIQUE: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint; |
| | | break; |
| | | case AttrEnum.MENTALITY: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint; |
| | | break; |
| | | } |
| | | |
| | | PlayerPropertyConfig propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)selectAttr); |
| | | washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint); |
| | | } |
| | | |
| | | private void ClickSureBtn() |
| | | { |
| | | if (itemConfig == null || itemModel == null) return; |
| | | |
| | | if(washPoint <= 0) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("WashPoint"); |
| | | } |
| | | else |
| | | { |
| | | int needCnt = (int)washPoint / itemConfig.EffectValueA1; |
| | | int remain = (int)washPoint % itemConfig.EffectValueA1; |
| | | |
| | | if(remain > 0) |
| | | { |
| | | needCnt = needCnt + 1; |
| | | } |
| | | |
| | | if(needCnt > itemModel.itemInfo.ItemCount) |
| | | { |
| | | needCnt = itemModel.itemInfo.ItemCount; |
| | | } |
| | | |
| | | if (itemModel.chinItemModel.BatchUse == 1 && needCnt > 1) |
| | | { |
| | | BatchUseModel.Instance.SetBatchModel(itemModel.itemInfo.ItemGUID); |
| | | BatchUseModel.Instance.SetExtraInfo((int)selectAttr,needCnt); |
| | | WindowCenter.Instance.Open<WashPointBatchUseWin>(); |
| | | } |
| | | else |
| | | { |
| | | PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace,1,(int)selectAttr); |
| | | } |
| | | |
| | | } |
| | | CloseWin(); |
| | | } |
| | | |
| | | private void CloseWin() |
| | | { |
| | | CloseImmediately(); |
| | | } |
| | | } |
| | | } |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class WashAttrPointWin : Window
|
| | | {
|
| | | [SerializeField] Toggle strenToggle; //力量
|
| | | [SerializeField] Toggle agilityToggle; //身法
|
| | | [SerializeField] Toggle physiqueToggle; //体质
|
| | | [SerializeField] Toggle mentAlityToggle; //灵力
|
| | | [SerializeField] Button closeBtn;
|
| | | [SerializeField] Button okBtn;
|
| | | [SerializeField] Text washAttrDesText;
|
| | |
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | | {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | | public static ItemModel itemModel = null;
|
| | | private ItemConfig itemConfig = null;
|
| | | private AttrEnum selectAttr = AttrEnum.POWER;
|
| | |
|
| | | float washPoint = 0;
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | washPoint = 0;
|
| | | strenToggle.isOn = true;
|
| | | agilityToggle.isOn = false;
|
| | | physiqueToggle.isOn = false;
|
| | | mentAlityToggle.isOn = false;
|
| | | strenToggle.onValueChanged.AddListener((bool isOn)=> { OnClickToggle(isOn); });
|
| | | agilityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
|
| | | physiqueToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
|
| | | mentAlityToggle.onValueChanged.AddListener((bool isOn) => { OnClickToggle(isOn); });
|
| | | closeBtn.AddListener(CloseWin);
|
| | | okBtn.AddListener(ClickSureBtn);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | InitUI();
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | closeBtn.RemoveAllListeners();
|
| | | strenToggle.RemoveAllListeners();
|
| | | agilityToggle.RemoveAllListeners();
|
| | | physiqueToggle.RemoveAllListeners();
|
| | | mentAlityToggle.RemoveAllListeners();
|
| | | okBtn.RemoveAllListeners();
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void InitUI()
|
| | | {
|
| | | if (itemModel == null) return;
|
| | |
|
| | | itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel.itemId);
|
| | | SetCurWashAttr();
|
| | | RefreshWashAttrDes();
|
| | | }
|
| | |
|
| | | private void OnClickToggle(bool isOn)
|
| | | {
|
| | | SetCurWashAttr();
|
| | | RefreshWashAttrDes();
|
| | | }
|
| | |
|
| | | private void SetCurWashAttr()
|
| | | {
|
| | | if (strenToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.POWER;
|
| | | }
|
| | | else if (agilityToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.AGILITY;
|
| | | }
|
| | | else if (physiqueToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.PHYSIQUE;
|
| | | }
|
| | | else if (mentAlityToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.MENTALITY;
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshWashAttrDes()
|
| | | {
|
| | | //float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr];
|
| | | //switch (selectAttr)
|
| | | //{
|
| | | // case AttrEnum.POWER:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.AGILITY:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.PHYSIQUE:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.MENTALITY:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
|
| | | // break;
|
| | | //}
|
| | |
|
| | | PlayerPropertyConfig propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)selectAttr);
|
| | | washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint);
|
| | | }
|
| | |
|
| | | private void ClickSureBtn()
|
| | | {
|
| | | if (itemConfig == null || itemModel == null) return;
|
| | |
|
| | | if(washPoint <= 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("WashPoint");
|
| | | }
|
| | | else
|
| | | {
|
| | | int needCnt = (int)washPoint / itemConfig.EffectValueA1;
|
| | | int remain = (int)washPoint % itemConfig.EffectValueA1;
|
| | |
|
| | | if(remain > 0)
|
| | | {
|
| | | needCnt = needCnt + 1;
|
| | | }
|
| | | |
| | | if(needCnt > itemModel.itemInfo.ItemCount)
|
| | | {
|
| | | needCnt = itemModel.itemInfo.ItemCount;
|
| | | }
|
| | |
|
| | | if (itemModel.chinItemModel.BatchUse == 1 && needCnt > 1)
|
| | | {
|
| | | BatchUseModel.Instance.SetBatchModel(itemModel.itemInfo.ItemGUID);
|
| | | BatchUseModel.Instance.SetExtraInfo((int)selectAttr,needCnt);
|
| | | WindowCenter.Instance.Open<WashPointBatchUseWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace,1,(int)selectAttr);
|
| | | }
|
| | | |
| | | }
|
| | | CloseWin();
|
| | | }
|
| | |
|
| | | private void CloseWin()
|
| | | {
|
| | | CloseImmediately();
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, December 05, 2017
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using Snxxz.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmBetterEquipBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] RectTransform m_ContainerBetterEquip;
|
| | | [SerializeField] ItemCell m_EquipBehaviour;
|
| | | [SerializeField] Text m_EquipName;
|
| | | [SerializeField] Button m_Close;
|
| | | [SerializeField] Button m_Puton;
|
| | | [SerializeField] Button m_BetterEquipDetail;
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | RealmBetterEquipModel model { get { return ModelCenter.Instance.GetModel<RealmBetterEquipModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | m_Close.AddListener(CloseBetterEquip);
|
| | | m_Puton.AddListener(PutOnBetterEquip);
|
| | | m_BetterEquipDetail.AddListener(ShowBetterEquipDetails);
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | m_Close.RemoveAllListeners();
|
| | | m_Puton.RemoveAllListeners();
|
| | | m_BetterEquipDetail.RemoveAllListeners();
|
| | | }
|
| | |
|
| | | public void ShowBetterEquip()
|
| | | {
|
| | | m_ContainerBetterEquip.gameObject.SetActive(false);
|
| | | if (!string.IsNullOrEmpty(model.currentEquipGuid))
|
| | | {
|
| | | ItemModel betterEquip;
|
| | | if (model.TryGetBetterEquip(model.currentEquipGuid, out betterEquip))
|
| | | {
|
| | | DrawBetterEquip(betterEquip);
|
| | | m_ContainerBetterEquip.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void PutOnBetterEquip()
|
| | | {
|
| | | PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, model.currentEquipGuid);
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | |
|
| | | private void ShowBetterEquipDetails()
|
| | | {
|
| | | ItemModel betterEquip;
|
| | | if (model.TryGetBetterEquip(model.currentEquipGuid, out betterEquip))
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(betterEquip.itemInfo.ItemID);
|
| | | itemTipsModel.SetItemTipsModel(PackType.rptItem, betterEquip.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | |
|
| | | private void CloseBetterEquip()
|
| | | {
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | |
|
| | | private void DrawBetterEquip(ItemModel betterModel)
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(betterModel.itemInfo.ItemID);
|
| | | m_EquipName.text = itemConfig.ItemName;
|
| | | m_EquipName.color = UIHelper.GetUIColor(itemConfig.ItemColor, true);
|
| | | m_EquipBehaviour.Init(betterModel, true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Role/RolePoint.cs.meta
copy to System/KnapSack/RealmBetterEquipBehaviour.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: c8eb21cc504d5514b950ab4d60ef9814 |
| | | timeCreated: 1534753740 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | public class InGamePushContainer : MonoBehaviour
|
| | | {
|
| | | [SerializeField] BetterItemGetBehaviour m_BetterEquipPusher;
|
| | | [SerializeField] RealmBetterEquipBehaviour m_RealmBetterEquipPusher;
|
| | | [SerializeField] PreciousItemGetBehaviour m_PreciousItemPusher;
|
| | | [SerializeField] FindPreciousBossRebornBehaviour m_BossRebornPusher;
|
| | | [SerializeField] ItemUseBehaviour m_itemUsePusher;
|
| | |
| | |
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | BetterEquipGetModel betterEquipGetModel { get { return ModelCenter.Instance.GetModel<BetterEquipGetModel>(); } }
|
| | | RealmBetterEquipModel realmEquipModel { get { return ModelCenter.Instance.GetModel<RealmBetterEquipModel>(); } }
|
| | | PreciousItemGetModel preciousItemGetModel { get { return ModelCenter.Instance.GetModel<PreciousItemGetModel>(); } }
|
| | | ItemUseModel itemUseModel { get { return ModelCenter.Instance.GetModel<ItemUseModel>(); } }
|
| | | ItemOverdueModel itemOverdue { get { return ModelCenter.Instance.GetModel<ItemOverdueModel>(); } }
|
| | |
| | | public void Init()
|
| | | {
|
| | | CheckBetterEquip();
|
| | | CheckRealmBetterEquip();
|
| | | CheckPreciousItem();
|
| | | CheckBossReborn();
|
| | | CheckItemUse();
|
| | |
| | | FirstChargeTrialShow();
|
| | | playerPack.RefreshDecomAttrAct += CheckEquipDecompose;
|
| | | betterEquipGetModel.showEquipRefreshEvent += CheckBetterEquip;
|
| | | realmEquipModel.showEquipRefreshEvent += CheckRealmBetterEquip;
|
| | | preciousItemGetModel.showItemRefreshEvent += CheckPreciousItem;
|
| | | findPreciousModel.bossRebornNotifyChangeEvent += CheckBossReborn;
|
| | | itemUseModel.showItemRefreshEvent += CheckItemUse;
|
| | |
| | | NewBieCenter.Instance.guideBeginEvent -= OnNewBieGuideBegin;
|
| | | guardModel.onDungeonEquipGuardEvent -= CheckDungeonGuard;
|
| | | firstTimeRechargeModel.IsTipShowEvent -= FirstChargeTrialShow;
|
| | | realmEquipModel.showEquipRefreshEvent -= CheckRealmBetterEquip;
|
| | | }
|
| | |
|
| | |
|
| | | private void CheckRealmBetterEquip()
|
| | | {
|
| | | if (string.IsNullOrEmpty(realmEquipModel.currentEquipGuid))
|
| | | {
|
| | | m_RealmBetterEquipPusher.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (betterEquipGetModel.ShowBetterEquipAble())
|
| | | {
|
| | | m_RealmBetterEquipPusher.gameObject.SetActive(true);
|
| | | m_RealmBetterEquipPusher.ShowBetterEquip();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RealmBetterEquipPusher.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void CheckBetterEquip()
|
| | |
| | | RedEnvelopeModel.RedEnvelope _envelope;
|
| | | if (envelopeModel.TryGetLatestEnvelope(out _envelope))
|
| | | {
|
| | | if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.Simple)
|
| | | if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
|
| | |
| | | bool IsBool = false;
|
| | | var State1 = RedpointCenter.Instance.GetRedpointState(201);//福利
|
| | | var State2 = RedpointCenter.Instance.GetRedpointState(210);
|
| | | if (State1 == RedPointState.Simple || State2 == RedPointState.Simple)
|
| | | if (State1 == RedPointState.Simple || State1 == RedPointState.GetReward || State2 == RedPointState.Simple)
|
| | | {
|
| | | IsBool = true;
|
| | | }
|
| | |
| | | var _complete = _playerData.value >= (_cfg as OSCBillTagAwardConfig).Condition;
|
| | | if (_complete)
|
| | | {
|
| | | _redpoint.state = RedPointState.Simple;
|
| | | _redpoint.state = RedPointState.GetReward;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | if (_rank != -1 && _rank >= _start
|
| | | && _rank <= _end && !_playerData.billAwardGet)
|
| | | {
|
| | | _redpoint.state = RedPointState.Simple;
|
| | | _redpoint.state = RedPointState.GetReward;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | foreach (var _key in m_Redpoints.Keys)
|
| | | {
|
| | | if (m_Redpoints[_key].state == RedPointState.Simple)
|
| | | if (m_Redpoints[_key].state == RedPointState.GetReward
|
| | | || m_Redpoints[_key].state == RedPointState.Simple)
|
| | | {
|
| | | return _key;
|
| | | }
|
| | |
| | | {
|
| | | foreach (var _key in m_Redpoints.Keys)
|
| | | {
|
| | | if (m_Redpoints[_key].state == RedPointState.Simple)
|
| | | if (m_Redpoints[_key].state == RedPointState.GetReward
|
| | | || m_Redpoints[_key].state == RedPointState.Simple)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | }
|
| | | if (Bool)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | redPointStre1.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void UpdateRedpackRedpoint(bool _checkVoice = false)
|
| | | {
|
| | | bool hasRed = m_OpenServerGetRedpin.state == RedPointState.Simple;
|
| | | bool hasRed = m_OpenServerGetRedpin.state == RedPointState.GetReward;
|
| | | m_OpenServerGetRedpin.state = RedPointState.None;
|
| | | if (CanGetEnvelope())
|
| | | {
|
| | | m_OpenServerGetRedpin.state = RedPointState.Simple;
|
| | | m_OpenServerGetRedpin.state = RedPointState.GetReward;
|
| | | if (_checkVoice && !hasRed && servereInited && HasOtherRedpack() && !HasSelfRedpack())
|
| | | {
|
| | | CheckRedEnvelopeVoice();
|
| | |
| | | get
|
| | | {
|
| | | return m_RedAchieveRedpoint.state == RedPointState.Simple
|
| | | || m_OpenServerGetRedpin.state == RedPointState.Simple;
|
| | | || m_OpenServerGetRedpin.state == RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | UIEffect uie = cell.transform.GetComponent<UIEffect>();
|
| | | if (petmodel.ListEffectSkill.Contains(curPetSkillIds[skillIdIndex]))
|
| | | {
|
| | | if (!uie.IsPlaying)
|
| | | {
|
| | | uie.Play();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (uie.IsPlaying)
|
| | | {
|
| | | uie.Stop();
|
| | | }
|
| | | uie.Play();
|
| | | |
| | | }
|
| | | if (petmodel._DicPetBack.ContainsKey(petInfoConfig.ID))
|
| | | {
|
| | |
| | | public static int currentLv { get; private set; }
|
| | | public static int beforeLv { get; private set; }
|
| | | public static int godWeaponType { get; private set; }
|
| | | public static int treasureSoulId { get; private set; }
|
| | |
|
| | | private static Dictionary<int, int> propertyUpDict = new Dictionary<int, int>();
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public static void TreasureSoulGetReward(int id, int _beforeLevel, int _currentLevel)
|
| | | {
|
| | | activateType = ActivateFunc.TreasureSoul;
|
| | | treasureSoulId = id;
|
| | | propertyCompares.Clear();
|
| | | propertyUpDict.Clear();
|
| | | var model = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | TreasureSpecialData special;
|
| | | if (model.TryGetTreasureSoul(treasureSoulId, out special))
|
| | | {
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.StrengthenAdd:
|
| | | var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
|
| | | var before = -1;
|
| | | var present = 0;
|
| | | for (int i = 0; i < configs.Count; i++)
|
| | | {
|
| | | if (_beforeLevel >= configs[i].countNeed)
|
| | | {
|
| | | before = i;
|
| | | }
|
| | | if (_currentLevel >= configs[i].countNeed)
|
| | | {
|
| | | present = i;
|
| | | }
|
| | | }
|
| | | ItemPlusSumAttrConfig _beforeConfig = null;
|
| | | if (before >= 0 && before < configs.Count)
|
| | | {
|
| | | _beforeConfig = configs[before];
|
| | | }
|
| | | List<int> _beforeProperties = new List<int>();
|
| | | if (_beforeConfig != null)
|
| | | {
|
| | | _beforeProperties.AddRange(_beforeConfig.attType);
|
| | | }
|
| | | var config = (present < 0 || present >= configs.Count) ? null : configs[present];
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | for (int i = 0; i < config.attType.Length; i++)
|
| | | {
|
| | | var _index = _beforeProperties.IndexOf(config.attType[i]);
|
| | | if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index])
|
| | | {
|
| | | propertyUpDict.Add(config.attType[i], config.attValue[i] -
|
| | | (_index == -1 ? 0 : _beforeConfig.attValue[_index]));
|
| | | propertyCompares.Add(new PropertyCompare()
|
| | | {
|
| | | key = config.attType[i],
|
| | | beforeValue = _index == -1 ? 0 : _beforeConfig.attValue[_index],
|
| | | currentValue = config.attValue[i]
|
| | | });
|
| | | }
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | | case TreasurePrivilege.MountAtk:
|
| | | case TreasurePrivilege.PetHp:
|
| | | case TreasurePrivilege.Sp:
|
| | | foreach (var _key in special.propertyDict.Keys)
|
| | | {
|
| | | var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress;
|
| | | var nowValue = special.propertyDict[_key] * _currentLevel / special.progress;
|
| | | propertyUpDict.Add(_key, nowValue - beforeValue);
|
| | | propertyCompares.Add(new PropertyCompare()
|
| | | {
|
| | | key = _key,
|
| | | beforeValue = beforeValue,
|
| | | currentValue = nowValue
|
| | | });
|
| | | }
|
| | | break;
|
| | | }
|
| | | fightPower = UIHelper.GetFightPower(propertyUpDict);
|
| | | if (!WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPropertyUpWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public static void PrepareSkillFly()
|
| | | {
|
| | | if (prepareFlySkillEvent != null)
|
| | |
| | | Realm,
|
| | | GodWeapon,
|
| | | Stove, //炼丹炉升级
|
| | | TreasureSoul,//法宝魂领取属性
|
| | | }
|
| | |
|
| | | public struct PropertyCompare
|
| | |
| | |
|
| | | [SerializeField] RectTransform m_ContainerNewGotFly;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerTreasureSoul;
|
| | | [SerializeField] Image m_TreasureSoulIcon;
|
| | | [SerializeField] Text m_TreasureSoulName;
|
| | |
|
| | | FunctionUnlockFlyObject flyObject;
|
| | |
|
| | | DateTime openTime = DateTime.Now;
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.gameObject.SetActive(false);
|
| | | m_ContainerSkill.gameObject.SetActive(false);
|
| | | m_ContainerProperty.gameObject.SetActive(false);
|
| | | m_ContainerLv.gameObject.SetActive(false);
|
| | | m_ContainerNewGotSkill.gameObject.SetActive(false);
|
| | | m_ContainerRealm.gameObject.SetActive(false);
|
| | | m_ContainerTreasureSoul.gameObject.SetActive(false);
|
| | | m_DisplayAlphaTween.SetStartState();
|
| | | flying = false;
|
| | | startFly = false;
|
| | |
| | | DisplayNewGotSkill();
|
| | | }
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.TreasureSoul:
|
| | | DisplayTreasureSoul();
|
| | | DisplayFightPower();
|
| | | DisplayProperty();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | m_Properties[i].gameObject.SetActive(true);
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.TreasureSoul:
|
| | | case ActivateShow.ActivateFunc.Realm:
|
| | | m_Properties[i].Display(ActivateShow.propertyCompares[i].key
|
| | | , ActivateShow.propertyCompares[i].beforeValue, ActivateShow.propertyCompares[i].currentValue);
|
| | |
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.Realm:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
|
| | | UI3DModelExhibition.Instance.BeginShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing);
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.GodWeapon:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600);
|
| | | UI3DTreasureExhibition.Instance.BeginShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage);
|
| | | break;
|
| | |
| | | PrepareFly(ActivateShow.skills[0]);
|
| | | }
|
| | |
|
| | | void DisplayTreasureSoul()
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(ActivateShow.treasureSoulId);
|
| | | if (config != null)
|
| | | {
|
| | | m_ContainerTreasureSoul.gameObject.SetActive(true);
|
| | | m_TreasureSoulIcon.SetSprite(config.Icon);
|
| | | m_TreasureSoulName.text = config.Name;
|
| | | }
|
| | | }
|
| | |
|
| | | void PrepareFly(int _skillId)
|
| | | {
|
| | | ActivateShow.PrepareSkillFly();
|
| | |
| | | [SerializeField] RealmProgressBehaviour m_RealmProgress;
|
| | |
|
| | | [SerializeField] UIEffect m_RealmDungeonSfx;
|
| | | [SerializeField] UIEffect m_GetRealmPointSfx;
|
| | |
|
| | | [SerializeField] Button m_FuncButton;
|
| | | [SerializeField] Text m_FuncButtonTxt;
|
| | |
| | | [SerializeField, Header("模型位置")] Vector3[] m_ModelPositions;
|
| | | [SerializeField, Header("当前境界位置")] Vector3[] m_RealmNowPositions;
|
| | | [SerializeField, Header("下一境界位置")] Vector3[] m_RealmNextwPositions;
|
| | | [SerializeField, Header("Boss位置")] Vector3[] m_BossPositions;
|
| | |
|
| | | int cacheRealmPoint = 0;
|
| | | Coroutine cacheCoroutine = null;
|
| | | RuntimeAnimatorController cacheController = null;
|
| | | const string State_EnterHash = "Show";
|
| | | const string State_IdleHash = "Idle";
|
| | |
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | |
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if (realmModel.realmDungeonState)
|
| | | {
|
| | | m_RawPlayer.gameObject.SetActive(true);
|
| | | StopBoss();
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.BeginShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job);
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | HandleAchievement();
|
| | |
| | | if (realmModel.realmDungeonState)
|
| | | {
|
| | | m_RealmDungeonSfx.Play();
|
| | | StartCoroutine(Co_DisplayBossShow());
|
| | | }
|
| | | realmModel.realmDungeonState = false;
|
| | | }
|
| | |
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent;
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | StopBoss();
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | realmModel.realmDungeonState = false;
|
| | | if (cacheCoroutine != null)
|
| | | {
|
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | IEnumerator Co_DisplayBossShow()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS800;
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | m_RawBoss.gameObject.SetActive(true);
|
| | | var config = ConfigManager.Instance.GetTemplate<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | StartBoss(config, true);
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType == PlayerDataRefresh.OfficialRank)
|
| | | {
|
| | | StopBoss();
|
| | | DisplayRealmNow();
|
| | | DisplayRealmNext();
|
| | | DisplayModel();
|
| | |
| | | DisplayModel();
|
| | | DisplayButton();
|
| | |
|
| | | if (PlayerDatas.Instance.extersion.realmPoint >= cacheRealmPoint)
|
| | | {
|
| | | DisplayGetRealmPointSfx();
|
| | | }
|
| | | cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | }
|
| | | }
|
| | |
| | | if (realmModel.IsRealmHighest || _realmPoint < config.NeedPoint)
|
| | | {
|
| | | m_RawPlayer.gameObject.SetActive(true);
|
| | | StopBoss();
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | UI3DModelExhibition.Instance.BeginShowSitDownPlayer(m_RawPlayer, PlayerDatas.Instance.baseData.Job);
|
| | | }
|
| | | else if (_realmPoint >= config.NeedGood)
|
| | |
| | | m_RawBoss.gameObject.SetActive(true);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | UI3DModelExhibition.Instance.BeginShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false);
|
| | | StartBoss(config);
|
| | | }
|
| | | }
|
| | |
|
| | | private void StopBoss()
|
| | | {
|
| | | var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
|
| | | if (npcModel != null && m_RawBoss.gameObject.activeSelf)
|
| | | {
|
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null && cacheController != null)
|
| | | {
|
| | | animator.runtimeAnimatorController = cacheController;
|
| | | }
|
| | | }
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | }
|
| | |
|
| | | private void StartBoss(RealmConfig config, bool act = false)
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | UI3DModelExhibition.Instance.BeginShowNPC(config.BossID, config.IsBigRealm == 1 ? Vector3.zero : direction, m_RawBoss, false);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(config.BossID);
|
| | | var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
|
| | | m_RawBoss.transform.localPosition = config.IsBigRealm == 1 ? m_BossPositions[1] : m_BossPositions[0];
|
| | | if (npcModel != null)
|
| | | {
|
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | cacheController = animator.runtimeAnimatorController;
|
| | | var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE);
|
| | | animator.runtimeAnimatorController = runtimeController;
|
| | | animator.Play(act ? State_EnterHash : State_IdleHash, 0);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | else
|
| | | {
|
| | | m_FuncButtonTxt.text = Language.Get("RealmWin_Bewrite_1");
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayGetRealmPointSfx()
|
| | | {
|
| | | if (m_GetRealmPointSfx != null)
|
| | | {
|
| | | m_GetRealmPointSfx.Play();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [SerializeField] Image baseImg;
|
| | | [SerializeField] Image specialImg;
|
| | | [SerializeField] Image addImg;
|
| | | [SerializeField] Button addBtn;
|
| | |
|
| | | [SerializeField] Text m_BaseTxt;
|
| | | [SerializeField] Text m_SpecialTxt;
|
| | | [SerializeField] Text m_AddTxt;
|
| | |
|
| | | private readonly Color selectTxtCol = new Color32(52, 7, 1, 255);
|
| | | private readonly Color unSelectTxtCol = new Color32(125, 91, 52, 255);
|
| | |
| | |
|
| | | [SerializeField] Text descText;
|
| | |
|
| | | private void OnAddBtn()
|
| | | {
|
| | | if (attrShowType == 3) return;
|
| | | attrShowType = 3;
|
| | |
|
| | | addImg.SetSprite("2LVSelectTab_b");
|
| | | specialImg.SetSprite("2LVUnSelectTab_b");
|
| | | baseImg.SetSprite("2LVUnSelectTab_b");
|
| | | m_BaseTxt.color = unSelectTxtCol;
|
| | | m_SpecialTxt.color = unSelectTxtCol;
|
| | | m_AddTxt.color = selectTxtCol;
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
|
| | | private void OnSpecialBtn()
|
| | | {
|
| | | if (attrShowType == 2) return;
|
| | | attrShowType = 2;
|
| | |
|
| | | addImg.SetSprite("2LVUnSelectTab_b");
|
| | | specialImg.SetSprite("2LVSelectTab_b");
|
| | | baseImg.SetSprite("2LVUnSelectTab_b");
|
| | | m_BaseTxt.color = unSelectTxtCol;
|
| | | m_SpecialTxt.color = selectTxtCol;
|
| | | m_AddTxt.color = unSelectTxtCol;
|
| | |
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
| | | if (attrShowType == 1) return;
|
| | | attrShowType = 1;
|
| | |
|
| | | addImg.SetSprite("2LVUnSelectTab_b");
|
| | | specialImg.SetSprite("2LVUnSelectTab_b");
|
| | | baseImg.SetSprite("2LVSelectTab_b");
|
| | | m_BaseTxt.color = selectTxtCol;
|
| | | m_SpecialTxt.color = unSelectTxtCol;
|
| | | m_AddTxt.color = unSelectTxtCol;
|
| | |
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
| | | {
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | m_Controller.OnGetDynamicSize += OnGetDynamicSize;
|
| | | addBtn.onClick.AddListener(OnAddBtn);
|
| | | specialBtn.onClick.AddListener(OnSpecialBtn);
|
| | | baseBtn.onClick.AddListener(OnBaseBtn);
|
| | | closeBtn.onClick.AddListener(OnClose);
|
| | |
| | | [SerializeField] RectTransform m_ContainerExp;
|
| | | [SerializeField] Slider m_ExpSlider;
|
| | | [SerializeField] Text m_WorldExp;
|
| | | [SerializeField] Button m_PromoteBtn;
|
| | | [SerializeField] Button m_PlayerPropertyBtn;
|
| | | [SerializeField] Button m_TitleBtn;
|
| | | [SerializeField] Button m_RenameBtn;
|
| | |
| | | {
|
| | | WindowCenter.Instance.Open<RoleAttrWin>();
|
| | | }
|
| | | private void OnPromoteClick()
|
| | | {
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
|
| | | {
|
| | | WindowCenter.Instance.Open<RolePoint>();
|
| | | }
|
| | | else
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
|
| | | }
|
| | | }
|
| | | //private void OnPromoteClick()
|
| | | //{
|
| | | // if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RolePoint>();
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
|
| | | // }
|
| | | //}
|
| | | private void OnRefreshPlayerInfo(PlayerDataRefresh refreshType)
|
| | | {
|
| | | switch (refreshType)
|
| | |
| | | functionButtonMagician.onClick.AddListener(OnFuncMagician);
|
| | | functionButtonGulu.onClick.AddListener(OnFuncGulu);
|
| | | functionButtonHorucx.onClick.AddListener(OnFuncHorucx);
|
| | | m_PromoteBtn.onClick.AddListener(OnPromoteClick);
|
| | | //m_PromoteBtn.onClick.AddListener(OnPromoteClick);
|
| | | m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
|
| | | m_TitleBtn.onClick.AddListener(OnDesignationClick);
|
| | | m_RenameBtn.onClick.AddListener(OnRenameClick);
|
| | |
| | | #endregion
|
| | |
|
| | | #region 主界面提升
|
| | | RolePointModel rolePointModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<RolePointModel>(); }
|
| | | }
|
| | |
|
| | | PlayerMethodData methodData
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<PlayerMethodData>(); }
|
| | |
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (_id == rolePointModel.addPointRedpoint.id ||
|
| | | _id == strengthengmodel.StrengthRedpoint.id ||
|
| | | if (_id == strengthengmodel.StrengthRedpoint.id ||
|
| | | _id == MainRedDot.RedPoint_MountPackKey ||
|
| | | _id == MainRedDot.Instance.redPonintPetFunc2.id ||
|
| | | _id == MainRedDot.Instance.redPointWashFunc.id ||
|
| | |
| | | {
|
| | | case PromoteDetailType.BetterEquip:
|
| | | return modelInterface.CheckBetterEquip(RoleEquipType.retSpiritAnimal);
|
| | | case PromoteDetailType.AddPoint:
|
| | | return ModelCenter.Instance.GetModel<RolePointModel>().addPointRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.EquipStrength:
|
| | | return strengthengmodel.StrengthRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.Mount:
|
| | |
| | | public enum PromoteDetailType
|
| | | {
|
| | | BetterEquip,
|
| | | AddPoint,
|
| | | EquipStrength,
|
| | | Mount,
|
| | | Pet,
|
| | |
| | | {
|
| | | var towerFloorConfig = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(model.selectedFloor);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(towerFloorConfig.BossId);
|
| | | if (npcConfig.Realm > 0)
|
| | |
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
|
| | | m_BossRealm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | else
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | //神兽强化;列表条目
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class GodBeastEntry : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell m_itemCell; |
| | | [SerializeField] GameObject m_Selectedbar_Image; |
| | | [SerializeField] Text m_Item_Text; |
| | | //[SerializeField] Button // |
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | public void GetGodBeastLocationMarker(int locationMarker)
|
| | | {
|
| | | int godBeastNumber = locationMarker / 10;
|
| | | int godBeastPart = locationMarker % 10;
|
| | | List<ItemModel> itemModel = dogz_model.GetDogzEquips(godBeastNumber);
|
| | | if (itemModel != null)
|
| | | {
|
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | if (itemModel[i].EquipPlace == godBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
|
| | | m_itemCell.Init(ItemModel);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel[i].itemId);
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor); |
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastEntry.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: ce0013549955f054e978142d01217a31 |
| | | timeCreated: 1534423338 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | | //神兽强化
|
| | | namespace Snxxz.UI
|
| | | { |
| | | public class GodBeastClass
|
| | | {
|
| | | public int GodBeastNumber;//神兽编号
|
| | | public int GodBeastPart;//神兽部位
|
| | | public int GodBeastLv;//神兽等级
|
| | | public int GodBeasProficiency;//熟练度
|
| | | public int GodBeastQuality;//神兽品质
|
| | | public int GodBeastStar;//神兽星级
|
| | | public int LocationMarker;//位置标记
|
| | | } |
| | | public class GodBeastReinforcementWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController; |
| | | [SerializeField] GodBeastSlidingList m_GodBeastSlidingList; |
| | | [SerializeField] GameObject m_Listprompt_Text;
|
| | |
|
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | private List<GodBeastClass> GodBeastList = new List<GodBeastClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | GetGodBeast();//获取神兽强化装备信息
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | if (GodBeastList.Count > 0)
|
| | | {
|
| | | m_ScrollerController.JumpIndex(0);
|
| | | } |
| | | m_GodBeastSlidingList.Init(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | |
| | | private void GetGodBeast()//存储神兽强化列表数据和排序
|
| | | {
|
| | | GodBeastList.Clear();
|
| | | var DogzEquipDict = dogz_model.dogzAssistStateDict;
|
| | | foreach (var key in DogzEquipDict.Keys)
|
| | | {
|
| | | if (DogzEquipDict[key] == 1)
|
| | | {
|
| | | GodBeastClass godBeastClass = new GodBeastClass();
|
| | | List<ItemModel> itemModel = dogz_model.GetDogzEquips(key);
|
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | godBeastClass.GodBeastNumber = key;
|
| | | godBeastClass.GodBeastPart = itemModel[i].EquipPlace;
|
| | | godBeastClass.GodBeastQuality = itemModel[i].chinItemModel.ItemColor;
|
| | | godBeastClass.GodBeastStar = itemModel[i].chinItemModel.StarLevel;
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | godBeastClass.GodBeastLv = IudetDogzEquipPlus[0];
|
| | | godBeastClass.GodBeasProficiency = IudetDogzEquipPlus[1];
|
| | | godBeastClass.LocationMarker= key*10+ itemModel[i].EquipPlace;
|
| | | GodBeastList.Add(godBeastClass);
|
| | | }
|
| | | }
|
| | | }
|
| | | GodBeastList.Sort(Compare);
|
| | | }
|
| | | int Compare(GodBeastClass x, GodBeastClass y)
|
| | | {
|
| | | if (x.GodBeastQuality.CompareTo(y.GodBeastQuality) != 0)//品质
|
| | | {
|
| | | return -x.GodBeastQuality.CompareTo(y.GodBeastQuality);
|
| | | }
|
| | | if (x.GodBeastStar.CompareTo(y.GodBeastStar) != 0)//星级
|
| | | {
|
| | | return -x.GodBeastStar.CompareTo(y.GodBeastStar);
|
| | | }
|
| | | if (x.GodBeastPart.CompareTo(y.GodBeastPart) != 0)//装备位
|
| | | {
|
| | | return x.GodBeastPart.CompareTo(y.GodBeastPart);
|
| | | }
|
| | | if (x.GodBeastLv.CompareTo(y.GodBeastLv) != 0)//强化等级
|
| | | {
|
| | | return -x.GodBeastLv.CompareTo(y.GodBeastLv);
|
| | | }
|
| | | if (x.GodBeasProficiency.CompareTo(y.GodBeasProficiency) != 0)//熟练度
|
| | | {
|
| | | return -x.GodBeasProficiency.CompareTo(y.GodBeasProficiency);
|
| | | }
|
| | | return 1;
|
| | | } |
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | if (GodBeastList.Count > 0)
|
| | | {
|
| | | m_Listprompt_Text.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Listprompt_Text.SetActive(true);
|
| | | }
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | | {
|
| | | int locationMarker = GodBeastList[i].LocationMarker;
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, locationMarker);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | |
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | GodBeastEntry godBeastEntry = cell.GetComponent<GodBeastEntry>();
|
| | | int locationMarker = cell.index;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| File was renamed from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: 69585e30fb1796b42b2b119b864f6776 |
| | | timeCreated: 1534421646 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, August 17, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | //神兽强化右侧材料吸收列表 |
| | | namespace Snxxz.UI { |
| | | |
| | | public class GodBeastSlidingList:MonoBehaviour {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | |
|
| | | [SerializeField] Text m_Label;
|
| | | [SerializeField] Button m_Arrow;
|
| | | [SerializeField] GameObject m_ScrollViewFirst;
|
| | | [SerializeField] Button m_ButtonAll;//所有
|
| | | [SerializeField] Button m_ButtonCrystal;//水晶
|
| | | [SerializeField] Button m_ButtonBlue;//蓝
|
| | | [SerializeField] Button m_ButtonPurple;//紫色
|
| | | [SerializeField] Button m_ButtonOrange;//橙色
|
| | |
|
| | | [SerializeField] Toggle m_ToggleAll;
|
| | | public int LINE = 10;
|
| | |
|
| | | private int Quality = 10;
|
| | | private void Start()
|
| | | {
|
| | | m_Arrow.AddListener(OnClickArrow);
|
| | | m_ButtonAll.AddListener(()=>{ OnClickSwith(10); });
|
| | | m_ButtonCrystal.AddListener(() => { OnClickSwith(1);});
|
| | | m_ButtonBlue.AddListener(() => { OnClickSwith(2); });
|
| | | m_ButtonPurple.AddListener(() => { OnClickSwith(3); });
|
| | | m_ButtonOrange.AddListener(() => { OnClickSwith(4); });
|
| | | m_ToggleAll.onValueChanged.AddListener(OnClickToggle);
|
| | | } |
| | | private void OnEnable()
|
| | | {
|
| | | |
| | | } |
| | | private void OnDisable()
|
| | | {
|
| | | |
| | | } |
| | | |
| | | public void Init()
|
| | | {
|
| | | Quality = 10;
|
| | | ContentSelect(Quality);
|
| | | if (m_ScrollViewFirst.activeSelf)
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(false);
|
| | | }
|
| | | if (m_ToggleAll.isOn)
|
| | | {
|
| | | m_ToggleAll.isOn = false;
|
| | | }
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | |
|
| | | } |
| | | |
| | | public void Unit()
|
| | | {
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
|
| | | }
|
| | |
|
| | | private void OnClickArrow()
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(!m_ScrollViewFirst.activeSelf);
|
| | | }
|
| | |
|
| | | private void OnClickToggle(bool IsBool)
|
| | | {
|
| | |
|
| | | }
|
| | | private void OnClickSwith(int Type)
|
| | | {
|
| | | Quality = Type;
|
| | | if (m_ScrollViewFirst.activeSelf)
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(false);
|
| | | }
|
| | | ContentSelect(Quality);
|
| | | }
|
| | | private void ContentSelect(int Type)
|
| | | {
|
| | | switch (Type)
|
| | | {
|
| | | case 1:
|
| | | m_Label.text = "强化水晶";
|
| | | break;
|
| | | case 2:
|
| | | m_Label.text = "蓝色以下";
|
| | | break;
|
| | | case 3:
|
| | | m_Label.text = "紫色以下";
|
| | | break;
|
| | | case 4:
|
| | | m_Label.text = "橙色以下";
|
| | | break;
|
| | | case 10:
|
| | | m_Label.text = "全部";
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | int code = 0;
|
| | | for (code = 0; code < LINE; code++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, code);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int gridlineIndex = cell.index;
|
| | | int childCode = 0;
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | | ChildNodes _ChildNodes = cell.transform.GetChild(childCode).GetComponent<ChildNodes>();
|
| | | _ChildNodes._ItemIcon.SetActive(false);
|
| | | _ChildNodes._Elect.SetActive(false);
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | if (cellCount - 1 < 1)
|
| | | {
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastSlidingList.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: e770376f004aa1143bcd9613fa087f12 |
| | | timeCreated: 1534485389 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | case RolePromoteModel.PromoteDetailType.BetterEquip:
|
| | | WindowCenter.Instance.Open<KnapSackWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.AddPoint:
|
| | | WindowCenter.Instance.Open<RolePoint>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.EquipStrength:
|
| | | WindowCenter.Instance.Open<EquipReinforceWin>();
|
| | | break;
|
| | |
| | | m_FunctionIcon.SetSprite(skillConfig.IconName);
|
| | | originalScale = 1f;
|
| | | break;
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(m_Id, m_TreasureIcon);
|
| | | originalScale = 9f;
|
| | | break;
|
| | | }
|
| | |
|
| | | this.transform.localScale = Vector3.one * originalScale;
|
| | |
| | | {
|
| | | case FunctionUnlockType.Treasure:
|
| | | case FunctionUnlockType.TreasureSkill:
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | break;
|
| | | case FunctionUnlockType.Normal:
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(126))
|
| | | treasureId = GetNextChallengeTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | treasureId = GetTreasureSoulTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.TreasureSoul;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | |
|
| | | treasureId = GetNextChallengeTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.WaitUnLock;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | treasureId = GetNextChallengeTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.WaitUnLock;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | |
|
| | | treasureId = GetTreasureSoulTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.TreasureSoul;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.WaitUnLock;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f));
|
| | | break;
|
| | | case DisplayState.TreasureSoul:
|
| | | if (treasure != null)
|
| | | {
|
| | | var privilege = treasure.unLockPrivilege;
|
| | | if (privilege != 0)
|
| | | {
|
| | | var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege);
|
| | | m_Description.text = Language.Get("FabaoState_Text_8", privilegeConfig.Name);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Description.text = Language.Get("FabaoState_Text_8", config.Name);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case DisplayState.WaitUnLock:
|
| | | Achievement achievement = null;
|
| | |
| | | );
|
| | | }
|
| | |
|
| | | private int GetTreasureSoulTreasure()
|
| | | {
|
| | | return humanTreasures.Find((x) =>
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(x, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | );
|
| | | }
|
| | |
|
| | | private int GetNextChallengeTreasure()
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | |
| | | AwakenAble,//可觉醒
|
| | | CollectSoul,//可集魂
|
| | | AwakenUnderway,//觉醒进行中
|
| | | TreasureSoul,//法宝魂觉醒中
|
| | | WaitUnLock,//等待解封
|
| | | PotentialUp,//潜力提升进行中
|
| | | PotentialUpAble,//潜力可提升
|
| | |
| | | var id = achievements[i];
|
| | | Achievement achievement;
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(id);
|
| | | if (config == null || PlayerDatas.Instance.baseData.LV < config.Condition3)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (model.TryGetAchievement(id, out achievement) && !achievement.completed)
|
| | | {
|
| | | return id;
|
| | |
| | |
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | | Achievement doingAchievement;
|
| | | if (achievementModel.TryGetAchievement(achievementGroup.GetDoingAchievement(), out doingAchievement))
|
| | | {
|
| | | var successConfig = ConfigManager.Instance.GetTemplate<SuccessConfig>(doingAchievement.id);
|
| | | if (successConfig.Condition3 > 0 && PlayerDatas.Instance.baseData.LV < successConfig.Condition3)
|
| | | {
|
| | | treasure.achievementRedpoint.state = RedPointState.None;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | treasure.achievementRedpoint.state = RedPointState.Simple;
|
| | |
| | | m_Story.text = string.Format(config.Verse[0], killNpcConfig.MaxAtk);
|
| | | }
|
| | | break;
|
| | | //case 304://签到相关配置移到功能配置表
|
| | | // var _specialData = treasure.specialData;
|
| | | // if (_specialData != null)
|
| | | // {
|
| | | // var _keyValue = _specialData.propertyDict.First();
|
| | | // var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
|
| | | // m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
|
| | | // }
|
| | | // break;
|
| | | case 304://签到相关配置移到功能配置表
|
| | | var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | var _propertyDict = soulModel.signAddProperty;
|
| | | if (_propertyDict != null)
|
| | | {
|
| | | var _keyValue = _propertyDict.First();
|
| | | var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
|
| | | m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
|
| | | }
|
| | | break;
|
| | | }
|
| | | flyObject = unlockFlyObject1;
|
| | | }
|
| | |
| | | }
|
| | | continue;
|
| | | }
|
| | |
|
| | | int beforeFinishCount = special.presentFinishCount;
|
| | |
|
| | | special.presentFinishCount = (int)_data.GotValue;
|
| | | special.presentGetCount = (int)_data.CurValue;
|
| | | special.itemGet = _data.ItemAwardState == 1;
|
| | |
| | | if (treasureSoulEvent != null)
|
| | | {
|
| | | treasureSoulEvent((int)_data.PriID);
|
| | | }
|
| | |
|
| | | if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
|
| | | && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()
|
| | | && !NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | ActivateShow.TreasureSoulGetReward((int)_data.PriID, beforeFinishCount, special.presentFinishCount);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | if (treasureSoulDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd))
|
| | | {
|
| | | var _specialData = treasureSoulDict[(int)TreasurePrivilege.StrengthenAdd];
|
| | | int beforeFinishCount = _specialData.presentFinishCount;
|
| | | _specialData.presentFinishCount = (int)_data.Cnt;
|
| | | UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
|
| | | if (beforeFinishCount < _specialData.presentFinishCount && serverInited && _specialData.active
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
|
| | | && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | ActivateShow.TreasureSoulGetReward((int)TreasurePrivilege.StrengthenAdd, |
| | | beforeFinishCount, _specialData.presentFinishCount);
|
| | | }
|
| | | }
|
| | | if (treasureSoulEvent != null)
|
| | | {
|
| | | treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var instance = UIUtility.CreateWidget("TreasureUnlockFlyObject_1", "TreasureUnlockFlyObject_1");
|
| | | instance.transform.SetParentEx(m_FurnacesFlyContainer, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | flyObject = instance.GetComponent<FunctionUnlockFlyObject>();
|
| | | flyObject.SetContent(FunctionUnlockType.Treasure, 301);
|
| | | flyObject.SetContent(FunctionUnlockType.TreasureFunc, 301);
|
| | | flyObject.transform.localScale = Vector3.one * m_FurnacesScale;
|
| | | flyObject.SetScale(m_FurnacesScale);
|
| | |
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | return consumeRebateRedpoint.state == RedPointState.Simple;
|
| | | return consumeRebateRedpoint.state == RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | consumeRebateRedpoint.state = RedPointState.Simple;
|
| | | consumeRebateRedpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= _cfg.LV && !_got)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= _cfg.LV &&
|
| | | PlayerDatas.Instance.baseData.VIPLv >= _cfg.VIPLimit && !_vipGot)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (CanFreeCoinPrayer())
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.ExpPray))
|
| | |
| | | var _expRuneCnt = playerPack.GetItemCountByID(PackType.rptItem, prayerExpRune);
|
| | | if (_expRuneCnt > 0)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | redpoint.state = RedPointState.None;
|
| | | return;
|
| | | }
|
| | | redpoint.state = todaySign ? RedPointState.None : RedPointState.Simple;
|
| | | redpoint.state = todaySign ? RedPointState.None : RedPointState.GetReward;
|
| | | }
|
| | |
|
| | | public override void Init()
|
| | |
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | | else if (signInModel.redpoint.state == RedPointState.Simple)
|
| | | else if (signInModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 0);
|
| | |
| | | {
|
| | | functionOrder = 2;
|
| | | }
|
| | | else if (prayerModel.redpoint.state == RedPointState.Simple)
|
| | | else if (prayerModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 1);
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (levelGiftModel.redpoint.state == RedPointState.Simple)
|
| | | if (levelGiftModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 3);
|
| | |
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | | else if (signInModel.redpoint.state == RedPointState.Simple)
|
| | | else if (signInModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | |
| | | {
|
| | | functionOrder = 2;
|
| | | }
|
| | | else if (prayerModel.redpoint.state == RedPointState.Simple)
|
| | | else if (prayerModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | |
| | | return 2;
|
| | | }
|
| | |
|
| | | if (levelGiftModel.redpoint.state == RedPointState.Simple)
|
| | | if (levelGiftModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 3;
|
| | | }
|
| | |
| | |
|
| | | RegisterModel<UnionTaskModel>();
|
| | | RegisterModel<FriendsModel>();
|
| | | RegisterModel<RolePointModel>();
|
| | | RegisterModel<RoleParticularModel>();
|
| | | RegisterModel<WorldBossModel>();
|
| | | RegisterModel<RolePromoteModel>();
|
| | |
| | | RegisterModel<ActivityModel>();
|
| | | RegisterModel<PlayerDeadModel>();
|
| | | RegisterModel<BetterEquipGetModel>();
|
| | | RegisterModel<RealmBetterEquipModel>();
|
| | | RegisterModel<PreciousItemGetModel>();
|
| | | RegisterModel<PlayerMainDate>();
|
| | | RegisterModel<StoryMissionsModel>();
|
| | |
| | | SetJumpLogic<RealmWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RolePoint:
|
| | | SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.MainTask:
|
| | | PlayerTaskDatas taskDatas = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
|
| | |
| | | SetJumpLogic<KnapSackWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenAddPoint:
|
| | | SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenHourse:
|
| | | SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
|
| | |
| | | m_BossName.text = npcConfig.charName; |
| | | m_BossLevel.text = _level.ToString(); |
| | | m_BossIcon.SetSprite(npcConfig.HeadPortrait); |
| | | if (npcConfig.Realm > 0) |
| | | |
| | | if (m_Realm != null) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm); |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | else |
| | | { |
| | | m_Realm.gameObject.SetActive(false); |
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm)) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm); |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | else |
| | | { |
| | | m_Realm.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | surplusSegments = -1; |
| | |
| | | using EnhancedUI.EnhancedScroller; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class SortTable : MonoBehaviour |
| | | { |
| | | [SerializeField] SortType m_SortType; |
| | | public SortType sortType |
| | | { |
| | | get |
| | | { |
| | | return m_SortType; |
| | | } |
| | | set |
| | | { |
| | | m_SortType = value; |
| | | } |
| | | } |
| | | [SerializeField] List<SortElement> m_SortElements; |
| | | [SerializeField] ScrollerController m_Controller; |
| | | [SerializeField] ClickScreenOtherSpace m_ClickOtherSpace; |
| | | [SerializeField] Text m_TargetDisplay; |
| | | public event Action<int> onSelectSortEvent; |
| | | public event Action onSortCloseEvent; |
| | | |
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } |
| | | private void Awake() |
| | | { |
| | | m_Controller.OnRefreshCell += OnRefreshCell; |
| | | } |
| | | |
| | | private void OnEnable() |
| | | { |
| | | m_Controller.Refresh(); |
| | | if (m_SortElements != null) |
| | | { |
| | | for (int i = 0; i < m_SortElements.Count; i++) |
| | | { |
| | | m_Controller.AddCell(ScrollerDataType.Header, i, OnSortSelect); |
| | | } |
| | | } |
| | | m_Controller.Restart(); |
| | | |
| | | if (m_ClickOtherSpace != null) |
| | | { |
| | | m_ClickOtherSpace.RemoveAllListeners(); |
| | | m_ClickOtherSpace.AddListener(() => |
| | | { |
| | | if (onSortCloseEvent != null) |
| | | { |
| | | onSortCloseEvent(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | private void OnSortSelect(CellView _cell) |
| | | { |
| | | var _index = _cell.index; |
| | | var type = m_SortElements[_index].type; |
| | | using EnhancedUI.EnhancedScroller;
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class SortTable : MonoBehaviour
|
| | | {
|
| | | [SerializeField] SortType m_SortType;
|
| | | public SortType sortType
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_SortType;
|
| | | }
|
| | | set
|
| | | {
|
| | | m_SortType = value;
|
| | | }
|
| | | }
|
| | | [SerializeField] List<SortElement> m_SortElements;
|
| | | [SerializeField] ScrollerController m_Controller;
|
| | | [SerializeField] ClickScreenOtherSpace m_ClickOtherSpace;
|
| | | [SerializeField] Text m_TargetDisplay;
|
| | | public event Action<int> onSelectSortEvent;
|
| | | public event Action onSortCloseEvent;
|
| | |
|
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
|
| | | private void Awake()
|
| | | {
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | m_Controller.Refresh();
|
| | | if (m_SortElements != null)
|
| | | {
|
| | | for (int i = 0; i < m_SortElements.Count; i++)
|
| | | {
|
| | | m_Controller.AddCell(ScrollerDataType.Header, i, OnSortSelect);
|
| | | }
|
| | | }
|
| | | m_Controller.Restart();
|
| | |
|
| | | if (m_ClickOtherSpace != null)
|
| | | {
|
| | | m_ClickOtherSpace.RemoveAllListeners();
|
| | | m_ClickOtherSpace.AddListener(() =>
|
| | | {
|
| | | if (onSortCloseEvent != null)
|
| | | {
|
| | | onSortCloseEvent();
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | private void OnSortSelect(CellView _cell)
|
| | | {
|
| | | var _index = _cell.index;
|
| | | var type = m_SortElements[_index].type;
|
| | | switch (sortType)
|
| | | {
|
| | | case SortType.EquipQuality:
|
| | |
| | | case SortType.EquipStar:
|
| | | dogzModel.SelectDogzItemStart = type;
|
| | | break;
|
| | | } |
| | | |
| | | if (onSelectSortEvent != null) |
| | | { |
| | | onSelectSortEvent(type); |
| | | } |
| | | if (onSortCloseEvent != null) |
| | | { |
| | | onSortCloseEvent(); |
| | | } |
| | | if (m_TargetDisplay != null) |
| | | { |
| | | m_TargetDisplay.text = Language.Get(m_SortElements[_index].textKey); |
| | | } |
| | | this.gameObject.SetActive(false); |
| | | } |
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _sortCell = cell as SortCell; |
| | | _sortCell.sortTypeTxt.text = Language.Get(m_SortElements[cell.index].textKey); |
| | | } |
| | | |
| | | public void SetDefault() |
| | | { |
| | | if (m_TargetDisplay != null && m_SortElements != null && m_SortElements.Count > 0) |
| | | { |
| | | m_TargetDisplay.text = Language.Get(m_SortElements[0].textKey); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public enum SortType |
| | | { |
| | | EquipQuality, |
| | | EquipStar, |
| | | } |
| | | [Serializable] |
| | | public struct SortElement |
| | | { |
| | | [Header("语言表key")] |
| | | public string textKey; |
| | | public int type; |
| | | } |
| | | } |
| | | |
| | | }
|
| | |
|
| | | if (onSelectSortEvent != null)
|
| | | {
|
| | | onSelectSortEvent(type);
|
| | | }
|
| | | if (onSortCloseEvent != null)
|
| | | {
|
| | | onSortCloseEvent();
|
| | | }
|
| | | if (m_TargetDisplay != null)
|
| | | {
|
| | | m_TargetDisplay.text = Language.Get(m_SortElements[_index].textKey);
|
| | | }
|
| | | this.gameObject.SetActive(false);
|
| | | }
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var _sortCell = cell as SortCell;
|
| | | _sortCell.sortTypeTxt.text = Language.Get(m_SortElements[cell.index].textKey);
|
| | | }
|
| | |
|
| | | public void SetDefault()
|
| | | {
|
| | | if (m_TargetDisplay != null && m_SortElements != null && m_SortElements.Count > 0)
|
| | | {
|
| | | m_TargetDisplay.text = Language.Get(m_SortElements[0].textKey);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public enum SortType
|
| | | {
|
| | | EquipQuality,
|
| | | EquipStar,
|
| | | }
|
| | | [Serializable]
|
| | | public struct SortElement
|
| | | {
|
| | | [Header("语言表key")]
|
| | | public string textKey;
|
| | | public int type;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | m_PlayerName.text = _name;
|
| | | m_HangHint.gameObject.SetActive(_hang);
|
| | | SetRealm(_realm);
|
| | | SetPlayerRealm(_realm);
|
| | | SetTitle(_titleId);
|
| | | SetAlliance(_alliance);
|
| | | SyncPosition(true);
|
| | | }
|
| | |
|
| | | public void SetRealm(int _realm)
|
| | | public void SetPlayerRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(_realm > 0);
|
| | | m_PlayerName.alignment = _realm > 0 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | |
|
| | | if (_realm > 0)
|
| | | if (m_Realm)
|
| | | {
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | if (_realm > 0)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public void SetFunctionalNpcRealm(int _realm)
|
| | | public void SetNpcRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | |
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | if (m_Realm != null)
|
| | | {
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void SetNPCName(string _name)
|
| | | {
|
| | | SetFunctionalNpcRealm(0);
|
| | | SetNpcRealm(999);
|
| | | m_PlayerName.text = _name;
|
| | | SyncPosition(true);
|
| | | }
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_id);
|
| | | if (config != null)
|
| | | {
|
| | | SetFunctionalNpcRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | findPreciousModel.bossInfoUpdateEvent -= UpdateNpcRebornTime;
|
| | | findPreciousModel.bossInfoUpdateEvent += UpdateNpcRebornTime;
|
| | | npcId = _npcId;
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = StringUtility.Contact(config.charName, Language.Get("HeadUpName_Monster", _level));
|
| | | monsterLevel = _level;
|
| | | monsterType = (E_MonsterType)config.IsBoss;
|
| | |
| | | Normal = 2,
|
| | | TreasureSkill = 3,
|
| | | Skill = 4,
|
| | | TreasureFunc = 5,
|
| | | }
|
| | |
|
| | | public enum RedPointState
|