Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
19个文件已删除
47个文件已修改
7个文件已添加
4 文件已复制
3 文件已重命名
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB107_tagMCRolePointInfo), typeof(DTCB107_tagMCRolePointInfo));
|
| | | Register(typeof(HA327_tagMCRealmExpInfo), typeof(DTCA327_tagMCRealmExpInfo));
|
| | | Register(typeof(HA40C_tagGCAllFamilyBossInfo), typeof(DTCA40C_tagGCAllFamilyBossInfo));
|
| | | Register(typeof(HA3B1_tagMCEquipPartStarInfo), typeof(DTCA3B1_tagMCEquipPartStarInfo));
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Monday, March 25, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class ReikiRootConfig |
| | | { |
| | | |
| | | public readonly int id;
|
| | | public readonly Int2 propertyPerPoint;
|
| | | public readonly int promoteProperty;
|
| | | public readonly int[] promoteValue;
|
| | | public readonly int[] qualityArea; |
| | | |
| | | public ReikiRootConfig() |
| | | { |
| | | } |
| | | |
| | | public ReikiRootConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out id); |
| | |
|
| | | Int2.TryParse(tables[1],out propertyPerPoint); |
| | |
|
| | | int.TryParse(tables[2],out promoteProperty); |
| | |
|
| | | string[] promoteValueStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | promoteValue = new int[promoteValueStringArray.Length]; |
| | | for (int i=0;i<promoteValueStringArray.Length;i++) |
| | | { |
| | | int.TryParse(promoteValueStringArray[i],out promoteValue[i]); |
| | | }
|
| | |
|
| | | string[] qualityAreaStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | qualityArea = new int[qualityAreaStringArray.Length]; |
| | | for (int i=0;i<qualityAreaStringArray.Length;i++) |
| | | { |
| | | int.TryParse(qualityAreaStringArray[i],out qualityArea[i]); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, ReikiRootConfig> configs = new Dictionary<string, ReikiRootConfig>(); |
| | | public static ReikiRootConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("ReikiRootConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | ReikiRootConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new ReikiRootConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static ReikiRootConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<ReikiRootConfig> GetValues() |
| | | { |
| | | var values = new List<ReikiRootConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/ReikiRoot.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/ReikiRoot.txt"); |
| | | } |
| | | |
| | | var tempConfig = new ReikiRootConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new ReikiRootConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new ReikiRootConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Role/RolePointWin.cs.meta
copy to Core/GameEngine/Model/Config/ReikiRootConfig.cs.meta
| File was copied from System/Role/RolePointWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d337657873ed5bb4bb61182d25e030e4 |
| | | timeCreated: 1540277803 |
| | | guid: 98b9f6b38bc0b1841bddba5f9aa30611 |
| | | timeCreated: 1553483326 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public int BasicsScoreAHit;//基础命中
|
| | | public int BasicsDodge;//基础闪避
|
| | | public uint equipShowSwitch;//装备显隐开关
|
| | | public int mater;//灵根属性——金
|
| | | public int wood;//灵根属性——木
|
| | | public int water;//灵根属性——水
|
| | | public int fire;//灵根属性——火
|
| | | public int earth;//灵根属性——土
|
| | | public long treasurePotentialSp
|
| | | {
|
| | | get
|
| | |
| | | public int PickupDist; // 拾取距离 73,
|
| | | public int RealMapID; // 数据地图ID 79,
|
| | | public uint Tick; // 当前Tick 89,
|
| | | public int luckValue; //气运 101
|
| | | public int battleValEx1; // <攻速 136
|
| | | public int battleValEx3; // <增加伤害 138
|
| | | public int damageReduceRate; // <减少伤害 132
|
| | |
| | | }
|
| | | break;
|
| | | case PlayerDataType.LuckValue:
|
| | | extersion.luckValue = (int)value;
|
| | | break;
|
| | | case PlayerDataType.ExAttr1:
|
| | | break;
|
| | |
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_ZhuxianRate:
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_ZhuxianHurtPer:
|
| | | case PlayerDataType.CDBPlayerRefresh_Mater:
|
| | | baseData.mater = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_Wood:
|
| | | baseData.wood = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_Water:
|
| | | baseData.water = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_Fire:
|
| | | baseData.fire = (int)value;
|
| | | break;
|
| | | case PlayerDataType.CDBPlayerRefresh_Earth:
|
| | | baseData.earth = (int)value;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | public partial class EquipGSParamConfig : IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<string, EquipGSParamConfig> s_tagGSModelDict = new Dictionary<string, EquipGSParamConfig>();//用于记录装备评分数据
|
| | | private static Dictionary<AttrEnum, int> _tagGsProValueDict = new Dictionary<AttrEnum, int>();
|
| | | private static Dictionary<PropertyType, int> _tagGsProValueDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | |
| | | return gsModel;
|
| | | }
|
| | |
|
| | | public static Dictionary<AttrEnum, int> GetTagGsProValueDict(int lv, int color, int star)
|
| | | public static Dictionary<PropertyType, int> GetTagGsProValueDict(int lv, int color, int star)
|
| | | {
|
| | | _tagGsProValueDict.Clear();
|
| | | EquipGSParamConfig gsModel = GetGSModel(lv, color, star);
|
| | | if (gsModel == null)
|
| | | return null;
|
| | |
|
| | | _tagGsProValueDict.Add(AttrEnum.AtkPrecent, gsModel.AtkPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.AddHurt, gsModel.DamagePerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.CritChance, gsModel.SuperHitRateC);
|
| | | _tagGsProValueDict.Add(AttrEnum.CritHurtPrecent, gsModel.SuperHitPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.ReduceHurt, gsModel.DamReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HpPrecent, gsModel.MaxHPPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.DefencePrecent, gsModel.DefPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HeartHit, gsModel.LuckyHitRateC);
|
| | | _tagGsProValueDict.Add(AttrEnum.PetAddHurt, gsModel.PetDamPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.EveryLvAddAtk, gsModel.PerLVAtkC);
|
| | | _tagGsProValueDict.Add(AttrEnum.DodgePrecent, gsModel.MissRateC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HitPrecent, gsModel.HitRateC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HurtReflect, gsModel.DamBackPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.EveryLvAddHp, gsModel.PerLVMaxHPC);
|
| | | _tagGsProValueDict.Add(AttrEnum.AddEquipDropPrecent, gsModel.DropEquipPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.AddCoinsPrecent, gsModel.DropMoneyPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.DefyDefResis, gsModel.IgnoreDefRateReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.DefChance, gsModel.DamChanceDefC);
|
| | | _tagGsProValueDict.Add(AttrEnum.CritResis, gsModel.SuperHitReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillHurt, gsModel.SkillAtkRateC);
|
| | | _tagGsProValueDict.Add(AttrEnum.MoveSpeedPrecent, gsModel.SpeedPerC);
|
| | | _tagGsProValueDict.Add(AttrEnum.ATKSPEED, gsModel.AtkSpeedC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillHurtPrecent, gsModel.SkillAtkRateReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HIT, gsModel.HitC);
|
| | | _tagGsProValueDict.Add(AttrEnum.MISS, gsModel.MissC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerA, gsModel.SkillAddPerAC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerB, gsModel.SkillAddPerBC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerC, gsModel.SkillAddPerCC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerD, gsModel.SkillAddPerDC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerE, gsModel.SkillAddPerEC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerF, gsModel.SkillAddPerFC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerG, gsModel.SkillAddPerGC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerA, gsModel.SkillReducePerAC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerB, gsModel.SkillReducePerBC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerC, gsModel.SkillReducePerCC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerD, gsModel.SkillReducePerDC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerE, gsModel.SkillReducePerEC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerF, gsModel.SkillReducePerFC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerG, gsModel.SkillReducePerGC);
|
| | | _tagGsProValueDict.Add(PropertyType.AtkPrecent, gsModel.AtkPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.AddHurt, gsModel.DamagePerC);
|
| | | _tagGsProValueDict.Add(PropertyType.CritChance, gsModel.SuperHitRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.CritHurtPrecent, gsModel.SuperHitPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.ReduceHurt, gsModel.DamReduceC);
|
| | | _tagGsProValueDict.Add(PropertyType.HpPrecent, gsModel.MaxHPPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.DefencePrecent, gsModel.DefPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.HeartHit, gsModel.LuckyHitRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.PetAddHurt, gsModel.PetDamPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.EveryLvAddAtk, gsModel.PerLVAtkC);
|
| | | _tagGsProValueDict.Add(PropertyType.DodgePrecent, gsModel.MissRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.HitPrecent, gsModel.HitRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.HurtReflect, gsModel.DamBackPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.EveryLvAddHp, gsModel.PerLVMaxHPC);
|
| | | _tagGsProValueDict.Add(PropertyType.AddEquipDropPrecent, gsModel.DropEquipPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.AddCoinsPrecent, gsModel.DropMoneyPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.DefyDefResis, gsModel.IgnoreDefRateReduceC);
|
| | | _tagGsProValueDict.Add(PropertyType.DefChance, gsModel.DamChanceDefC);
|
| | | _tagGsProValueDict.Add(PropertyType.CritResis, gsModel.SuperHitReduceC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillHurt, gsModel.SkillAtkRateC);
|
| | | _tagGsProValueDict.Add(PropertyType.MoveSpeedPrecent, gsModel.SpeedPerC);
|
| | | _tagGsProValueDict.Add(PropertyType.ATKSPEED, gsModel.AtkSpeedC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillHurtPrecent, gsModel.SkillAtkRateReduceC);
|
| | | _tagGsProValueDict.Add(PropertyType.HIT, gsModel.HitC);
|
| | | _tagGsProValueDict.Add(PropertyType.MISS, gsModel.MissC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerA, gsModel.SkillAddPerAC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerB, gsModel.SkillAddPerBC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerC, gsModel.SkillAddPerCC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerD, gsModel.SkillAddPerDC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerE, gsModel.SkillAddPerEC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerF, gsModel.SkillAddPerFC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillAddPerG, gsModel.SkillAddPerGC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerA, gsModel.SkillReducePerAC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerB, gsModel.SkillReducePerBC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerC, gsModel.SkillReducePerCC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerD, gsModel.SkillReducePerDC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerE, gsModel.SkillReducePerEC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerF, gsModel.SkillReducePerFC);
|
| | | _tagGsProValueDict.Add(PropertyType.SkillReducePerG, gsModel.SkillReducePerGC);
|
| | | return _tagGsProValueDict;
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B2 06 玩家加点 #tagCMAddPoint
|
| | |
|
| | | public class CB206_tagCMAddPoint : GameNetPackBasic {
|
| | | public byte PointAttrIDCount; // 加点属性ID个数
|
| | | public byte[] PointAttrIDList; // 加点属性ID列表
|
| | | public ushort[] PointValueList; // 加点属性ID对应的点数列表
|
| | |
|
| | | public CB206_tagCMAddPoint () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xB206;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (PointAttrIDCount, NetDataType.BYTE);
|
| | | WriteBytes (PointAttrIDList, NetDataType.BYTE, PointAttrIDCount);
|
| | | WriteBytes (PointValueList, NetDataType.WORD, PointAttrIDCount);
|
| | | }
|
| | |
|
| | | }
|
copy from System/Role/RolePointWin.cs.meta
copy to Core/NetworkPackage/ClientPack/ClientToMapServer/CB2_NewFunction/CB206_tagCMAddPoint.cs.meta
| File was copied from System/Role/RolePointWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d337657873ed5bb4bb61182d25e030e4 |
| | | timeCreated: 1540277803 |
| | | guid: a674b054ed830b64798519873146fc6e |
| | | timeCreated: 1553496718 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, March 25, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | |
|
| | | public class DTCB107_tagMCRolePointInfo : DtcBasic {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HB107_tagMCRolePointInfo;
|
| | | ModelCenter.Instance.GetModel<ReikiRootModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| File was renamed from System/Role/RolePointWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d337657873ed5bb4bb61182d25e030e4 |
| | | timeCreated: 1540277803 |
| | | guid: de8eaad4e383f6f438a5ef4f4ecfbc63 |
| | | timeCreated: 1553497409 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B1 07 玩家点数信息 #tagMCRolePointInfo
|
| | |
|
| | | public class HB107_tagMCRolePointInfo : GameNetPackBasic {
|
| | | public byte PointAttrIDCount; // 点类型个数
|
| | | public byte[] PointAttrIDList; // 点类型列表
|
| | | public ushort[] PointValueList; // 点类型对应已加自由点数列表
|
| | |
|
| | | public HB107_tagMCRolePointInfo () {
|
| | | _cmd = (ushort)0xB107;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out PointAttrIDCount, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out PointAttrIDList, vBytes, NetDataType.BYTE, PointAttrIDCount);
|
| | | TransBytes (out PointValueList, vBytes, NetDataType.WORD, PointAttrIDCount);
|
| | | }
|
| | |
|
| | | }
|
copy from System/Role/RolePointWin.cs.meta
copy to Core/NetworkPackage/ServerPack/HB1_Role/HB107_tagMCRolePointInfo.cs.meta
| File was copied from System/Role/RolePointWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d337657873ed5bb4bb61182d25e030e4 |
| | | timeCreated: 1540277803 |
| | | guid: f06926fe399075046980dfee35b48088 |
| | | timeCreated: 1553497359 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | int _color = LuaAPI.xlua_tointeger(L, 2); |
| | | int _star = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.Dictionary<AttrEnum, int> gen_ret = EquipGSParamConfig.GetTagGsProValueDict( _lv, _color, _star ); |
| | | System.Collections.Generic.Dictionary<PropertyType, int> gen_ret = EquipGSParamConfig.GetTagGsProValueDict( _lv, _color, _star ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | AttrEnum _type;translator.Get(L, 1, out _type); |
| | | PropertyType _type;translator.Get(L, 1, out _type); |
| | | |
| | | float gen_ret = UIHelper.GetPropertyMapPlayerData( _type ); |
| | | LuaAPI.lua_pushnumber(L, gen_ret); |
| | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RoleModel), SnxxzUIRoleModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.RolePointModel), SnxxzUIRolePointModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TitleModel), SnxxzUITitleModelWrap.__Register); |
| | | |
| | | |
| | |
| | | |
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } |
| | | AuctionNewGetShowModel model { get { return ModelCenter.Instance.GetModel<AuctionNewGetShowModel>(); } } |
| | | AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>(); |
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | |
| | | string guid; |
| | | public void Display(string guid) |
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | Color32 conditionColor = new Color32(255, 244, 205, 255);
|
| | | Color32 conditionRedColor = new Color32(255, 1, 1, 255);
|
| | |
| | | needPointDict.Clear();
|
| | | if (itemAttrData.itemConfig.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | for (i = 0; i < needPointTextlist.Count; i++)
|
| | |
| | | needPointNumlist[i].gameObject.SetActive(true);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1,needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | Color32 conditionColor = new Color32(255, 244, 205, 255);
|
| | | Color32 conditionRedColor = new Color32(255, 1, 1, 255);
|
| | |
| | | needPointDict.Clear();
|
| | | if (itemPathModel.chinItemModel.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemPathModel.chinItemModel.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemPathModel.chinItemModel.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemPathModel.chinItemModel.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemPathModel.chinItemModel.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemPathModel.chinItemModel.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemPathModel.chinItemModel.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemPathModel.chinItemModel.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemPathModel.chinItemModel.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | for (i = 0; i < needPointTextlist.Count; i++)
|
| | |
| | | needPointNumlist[i].gameObject.SetActive(true);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1,needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]],needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | string minAtkValue = "";
|
| | | attrNamelist[code].gameObject.SetActive(true);
|
| | | attrValuelist[code].gameObject.SetActive(true);
|
| | | switch ((AttrEnum)attrIdlist[i])
|
| | | switch ((PropertyType)attrIdlist[i])
|
| | | {
|
| | | case AttrEnum.MinAtk:
|
| | | case PropertyType.MinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMinAtk:
|
| | | case PropertyType.PetMinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMaxAtk:
|
| | | case AttrEnum.MaxAtk:
|
| | | case PropertyType.PetMaxAtk:
|
| | | case PropertyType.MaxAtk:
|
| | | tipsModel.SetPetAttrStr(attrIdlist[i - 1], itemEffectDict[attrIdlist[i - 1]], out minAtkName, out minAtkValue);
|
| | | tipsModel.SetPetAttrStr(attrIdlist[i], itemEffectDict[attrIdlist[i]], out attrName, out attrValue, minAtkValue);
|
| | | code += 1;
|
| | |
| | | |
| | | public class CandidateEquipBehaviour : ScrollItem |
| | | { |
| | | [SerializeField] ImageEx m_BackGround; |
| | | [SerializeField] Image m_UnLockLabel; |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_EquipName; |
| | |
| | | { |
| | | var equip = packModel.GetItemByGuid(this.candidateEquip.guid); |
| | | m_ItemCell.Init(equip, true); |
| | | m_UnLockLabel.gameObject.SetActive(!model.IsLevelUnLocked(equip.config.LV)); |
| | | m_ItemCell.button.enabled = false; |
| | | |
| | | var isEquipLevelUnlocked = model.IsLevelUnLocked(equip.config.LV); |
| | | m_BackGround.gray=!isEquipLevelUnlocked; |
| | | m_UnLockLabel.gameObject.SetActive(!isEquipLevelUnlocked); |
| | | m_EquipName.text = equip.config.ItemName; |
| | | m_EquipName.color = UIHelper.GetUIColor(equip.config.ItemColor, true); |
| | | m_EquipSorce.text = string.Format("评分:{0}", equip.score); |
| | |
| | | |
| | | public readonly List<int> showedSuitPlaceEffect = new List<int>(); |
| | | public readonly List<int> showedSuitLevelEffect = new List<int>(); |
| | | public readonly List<int> remindedSuitSetAppearances = new List<int>(); |
| | | |
| | | public readonly LogicInt selectedLevel = new LogicInt(); |
| | | public readonly LogicString selectedEquip = new LogicString(); |
| | |
| | | var showedSuitLevelEffectsRecord = LocalSave.GetIntArray(StringUtility.Contact(playerId, "_showedSuitLevelEffect")); |
| | | if (showedSuitLevelEffectsRecord != null) |
| | | { |
| | | showedSuitPlaceEffect.AddRange(showedSuitLevelEffectsRecord); |
| | | showedSuitLevelEffect.AddRange(showedSuitLevelEffectsRecord); |
| | | } |
| | | |
| | | remindedSuitSetAppearances.Clear(); |
| | | var remindedSetAppearancesRecord = LocalSave.GetIntArray(StringUtility.Contact(playerId, "_reminedSuitLevelSetAppearance")); |
| | | if (remindedSetAppearancesRecord != null) |
| | | { |
| | | remindedSuitSetAppearances.AddRange(remindedSetAppearancesRecord); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | public int GetFirstRedpointEquipSet() |
| | | { |
| | | for (int i = sortedLevels.Count - 1; i >= 0; i--) |
| | | for (int i = 0; i < sortedLevels.Count; i++) |
| | | { |
| | | var level = sortedLevels[i]; |
| | | if (equipSets[level].redpoint.state == RedPointState.Simple) |
| | | if (equipSets[level].redpoint.state != RedPointState.None) |
| | | { |
| | | return level; |
| | | } |
| | |
| | | |
| | | candidateEquips.Sort((x, y) => |
| | | { |
| | | var a = packModel.GetItemByGuid(x.guid); |
| | | var b = packModel.GetItemByGuid(y.guid); |
| | | return -a.score.CompareTo(b.score); |
| | | var betterX = CompareToCurrent(x.guid); |
| | | var betterY = CompareToCurrent(y.guid); |
| | | |
| | | if (betterX > 0 && betterY < 0) |
| | | { |
| | | return -1; |
| | | } |
| | | else if (betterX < 0 && betterY > 0) |
| | | { |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | var a = packModel.GetItemByGuid(x.guid); |
| | | var b = packModel.GetItemByGuid(y.guid); |
| | | return -a.score.CompareTo(b.score); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | public bool IsSetAppearanceHinted(int level) |
| | | { |
| | | return remindedSuitSetAppearances.Contains(level); |
| | | } |
| | | |
| | | public void RecordSuitSetAppearanceHint(int level) |
| | | { |
| | | if (!remindedSuitSetAppearances.Contains(level)) |
| | | { |
| | | remindedSuitSetAppearances.Add(level); |
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID; |
| | | LocalSave.SetIntArray(StringUtility.Contact(playerId, "_reminedSuitLevelSetAppearance"), remindedSuitSetAppearances.ToArray()); |
| | | } |
| | | } |
| | | |
| | | private void OnPlayerDataRefresh(PlayerDataType type) |
| | | { |
| | | switch (type) |
| | |
| | | break; |
| | | case PlayerDataType.EquipShowSwitch: |
| | | UpdateAppearanceState(selectedLevel.value); |
| | | |
| | | var level = (int)PlayerDatas.Instance.baseData.equipShowSwitch / 10; |
| | | if (level != 0 && level == selectedLevel.value) |
| | | { |
| | | var equipSet = GetEquipSet(level); |
| | | if (equipSet != null) |
| | | { |
| | | var config = RealmConfig.Get(equipSet.realm); |
| | | SysNotifyMgr.Instance.ShowTip("WearRealmEquip1", config.Name); |
| | | } |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | public void Display(int level, int place) |
| | | { |
| | | this.level = level; |
| | | this.place = place; |
| | | var set = model.GetEquipSet(level); |
| | | slot = set.GetEquipSlot(place); |
| | | |
| | |
| | | var equip = packModel.GetItemByGuid(equipGuid); |
| | | if (equip == null) |
| | | { |
| | | m_SlotName.gameObject.SetActive(false); |
| | | m_SlotName.gameObject.SetActive(true); |
| | | m_Icon.SetSprite(GetDefaultEquipIcon(slot.equipPosition.y)); |
| | | m_IconFrame.SetItemBackGround(0); |
| | | m_IconFrame.SetSprite("ItemNormal_a"); |
| | | } |
| | | else |
| | | { |
| | | m_SlotName.gameObject.SetActive(slot.unLocked); |
| | | m_SlotName.gameObject.SetActive(false); |
| | | m_Icon.SetSprite(equip.config.IconKey); |
| | | m_IconFrame.SetItemBackGround(equip.config.ItemColor); |
| | | } |
| | |
| | | |
| | | int level; |
| | | |
| | | public void Init(int level) |
| | | public void Init(int level, int eightSuitLevel) |
| | | { |
| | | this.level = level; |
| | | |
| | |
| | | m_StarToggles[2].SetActive(maxLevel >= 6); |
| | | m_StarToggles[1].SetActive(maxLevel >= 3); |
| | | m_StarToggles[0].SetActive(true); |
| | | |
| | | if (eightSuitLevel < 0) |
| | | { |
| | | m_StarToggles[0].Select(); |
| | | } |
| | | else if (eightSuitLevel < 3) |
| | | { |
| | | m_StarToggles[1].Select(); |
| | | } |
| | | else if (eightSuitLevel < 6) |
| | | { |
| | | m_StarToggles[2].Select(); |
| | | } |
| | | else |
| | | { |
| | | m_StarToggles[3].Select(); |
| | | } |
| | | } |
| | | |
| | | public void DisplaySuitPlaces(List<int> places) |
| | |
| | | { |
| | | m_SuitLevelEffects[2].Play(); |
| | | model.RecordSuitLevelEffectPlay(new Int3(suitActive.level, suitActive.star, 8)); |
| | | if (!model.IsSetAppearanceHinted(suitActive.level)) |
| | | { |
| | | model.RecordSuitSetAppearanceHint(suitActive.level); |
| | | var equipSet = model.GetEquipSet(suitActive.level); |
| | | var config = RealmConfig.Get(equipSet.realm); |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), |
| | | Language.Get("WearRealmEquip", config.Name, config.Name), |
| | | (bool ok) => { if (ok) { model.SetAppearance(suitActive.level); } } |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | public void SetActive(bool active) |
| | | { |
| | | title.gameObject.SetActive(active); |
| | | toggle.isOn = active; |
| | | toggle.interactable = active; |
| | | if (active) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public void Select() |
| | | { |
| | | toggle.isOn = true; |
| | | } |
| | | |
| | | private void OnValueChange(bool value) |
| | | { |
| | | if (value) |
| | |
| | | var level = model.selectedLevel.Fetch(); |
| | | |
| | | DisplayEquips(level); |
| | | m_SuitPropertyWidget.Init(level); |
| | | var eightSuitLevel = model.GetSuitLevel(level, EquipSuitType.EightSuit); |
| | | m_SuitPropertyWidget.Init(level , eightSuitLevel); |
| | | } |
| | | |
| | | if (force || model.appearance.dirty) |
| | |
| | | if (equip != null)
|
| | | {
|
| | | m_EquipItem.Init(equip);
|
| | | m_EquipItem.button.SetListener(() =>
|
| | | {
|
| | | var itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>();
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | });
|
| | | }
|
| | |
|
| | | for (int i = 0; i < m_GemHoles.Length; i++)
|
| | |
| | | var normalProperties = new List<Int3>(); |
| | | foreach (var item in data.baseProperties) |
| | | { |
| | | switch ((AttrEnum)item.x) |
| | | switch ((PropertyType)item.x) |
| | | { |
| | | case AttrEnum.MinAtk: |
| | | case AttrEnum.PetMinAtk: |
| | | case PropertyType.MinAtk: |
| | | case PropertyType.PetMinAtk: |
| | | attack.x = item.y; |
| | | break; |
| | | case AttrEnum.MaxAtk: |
| | | case AttrEnum.PetMaxAtk: |
| | | case PropertyType.MaxAtk: |
| | | case PropertyType.PetMaxAtk: |
| | | attack.y = item.y; |
| | | break; |
| | | default: |
| | |
| | | { |
| | | foreach (var item in data.starProperties) |
| | | { |
| | | switch ((AttrEnum)item.x) |
| | | switch ((PropertyType)item.x) |
| | | { |
| | | case AttrEnum.ATK: |
| | | case PropertyType.ATK: |
| | | attack.z = item.y; |
| | | break; |
| | | default: |
| | |
| | | var lineIndex = 0; |
| | | if (attack != Int3.zero) |
| | | { |
| | | var config = PlayerPropertyConfig.Get((int)AttrEnum.ATK); |
| | | var config = PlayerPropertyConfig.Get((int)PropertyType.ATK); |
| | | var name = config.Name; |
| | | if (attack.z > 0) |
| | | { |
| | | var starValue = PlayerPropertyConfig.GetValueDescription((int)AttrEnum.ATK, attack.z); |
| | | var starValue = PlayerPropertyConfig.GetValueDescription((int)PropertyType.ATK, attack.z); |
| | | var starDescription = UIHelper.AppendColor(TextColType.Green, string.Format(" ({0}星+{1})", data.star, starValue)); |
| | | lines[lineIndex++] = string.Format("{0} +{1}-{2}{3}", name, attack.x, attack.y, starDescription); |
| | | } |
| | |
| | | [SerializeField]
|
| | | CanvasGroup tipAlpha;
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel {
|
| | |
| | | needPointDict.Clear();
|
| | | if (itemAttrData.itemConfig.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | float offset = 0;
|
| | |
| | | offset = needPointDict[needlist[i]] - UIHelper.GetPropertyMapPlayerData(needlist[i]);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | [SerializeField]
|
| | | CanvasGroup tipAlpha;
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | |
| | | needPointDict.Clear();
|
| | | if (itemAttrData.itemConfig.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | float offset = 0;
|
| | |
| | | offset = needPointDict[needlist[i]] - UIHelper.GetPropertyMapPlayerData(needlist[i]);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | MagicianModel magicianModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } } |
| | | TrialDungeonModel trialModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } } |
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } } |
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } } |
| | | |
| | | public void Init() |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="itemId"></param> |
| | | /// <returns></returns> |
| | | private Dictionary<AttrEnum, float> curEquipAttrDict = new Dictionary<AttrEnum, float>(); //存储当前装备属性对应的数值 key 属性 value 属性值 |
| | | private Dictionary<PropertyType, float> curEquipAttrDict = new Dictionary<PropertyType, float>(); //存储当前装备属性对应的数值 key 属性 value 属性值 |
| | | private int CalculateEquipScore(PackType type, int itemId, EquipSorceProperties properties) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | |
| | | var GSProValueDict = EquipGSParamConfig.GetTagGsProValueDict(config.LV, config.ItemColor, config.StarLevel); |
| | | foreach (var key in properties.Keys) |
| | | { |
| | | var attrType = (AttrEnum)key; |
| | | var attrType = (PropertyType)key; |
| | | switch (attrType) |
| | | { |
| | | case AttrEnum.ATKSPEED: |
| | | case AttrEnum.OnlyFinalHurt: |
| | | case AttrEnum.PVPAtkBackHP: |
| | | case PropertyType.ATKSPEED: |
| | | case PropertyType.OnlyFinalHurt: |
| | | case PropertyType.PVPAtkBackHP: |
| | | curEquipAttrDict.Add(attrType, properties[key]); |
| | | break; |
| | | default: |
| | |
| | | |
| | | private void ConvertAttrId(int attrId, int attrValue, Dictionary<int, int> keyValues) |
| | | { |
| | | switch ((AttrEnum)attrId) |
| | | switch ((PropertyType)attrId) |
| | | { |
| | | case AttrEnum.ATK: |
| | | if (!keyValues.ContainsKey((int)AttrEnum.MinAtk)) |
| | | case PropertyType.ATK: |
| | | if (!keyValues.ContainsKey((int)PropertyType.MinAtk)) |
| | | { |
| | | keyValues.Add(((int)AttrEnum.MinAtk), attrValue); |
| | | keyValues.Add(((int)PropertyType.MinAtk), attrValue); |
| | | } |
| | | else |
| | | { |
| | | keyValues[(int)AttrEnum.MinAtk] += attrValue; |
| | | keyValues[(int)PropertyType.MinAtk] += attrValue; |
| | | } |
| | | |
| | | if (!keyValues.ContainsKey((int)AttrEnum.MaxAtk)) |
| | | if (!keyValues.ContainsKey((int)PropertyType.MaxAtk)) |
| | | { |
| | | keyValues.Add(((int)AttrEnum.MaxAtk), attrValue); |
| | | keyValues.Add(((int)PropertyType.MaxAtk), attrValue); |
| | | } |
| | | else |
| | | { |
| | | keyValues[(int)AttrEnum.MaxAtk] += attrValue; |
| | | keyValues[(int)PropertyType.MaxAtk] += attrValue; |
| | | } |
| | | break; |
| | | default: |
| | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | }
|
| | |
|
| | | if (!equipModel.IsLevelUnLocked(model.config.LV))
|
| | | {
|
| | | return;
|
| | | }
|
| | | |
| | | int isFightUp = IsFightUp(model.itemId, model.score); |
| | | if (isFightUp != 1)
|
| | |
| | | if (playerProModel != null)
|
| | | {
|
| | | string s = "";
|
| | | switch ((AttrEnum)idlist[i])
|
| | | switch ((PropertyType)idlist[i])
|
| | | {
|
| | | case AttrEnum.OnlyFinalHurt:
|
| | | case PropertyType.OnlyFinalHurt:
|
| | | s = Language.Get("EquipTip_ExtraDamage", GetExhaustedAttrValue(idlist[i], valuelist[i]), GetExhaustedMaxLv(attrData.itemConfig.LV), valuelist[i]);
|
| | | break;
|
| | | case AttrEnum.PVPAtkBackHP:
|
| | | case PropertyType.PVPAtkBackHP:
|
| | | s = Language.Get("EquipTip_ExtraHpBack", GetExhaustedAttrValue(idlist[i], valuelist[i]), GetExhaustedMaxLv(attrData.itemConfig.LV), valuelist[i]);
|
| | | break;
|
| | | }
|
| | |
| | | attrName = "";
|
| | | attrValueStr = "";
|
| | | PlayerPropertyConfig playerProModel = null;
|
| | | if (attrId == (int)AttrEnum.MaxAtk || attrId == (int)AttrEnum.PetMaxAtk)
|
| | | if (attrId == (int)PropertyType.MaxAtk || attrId == (int)PropertyType.PetMaxAtk)
|
| | | {
|
| | | playerProModel = PlayerPropertyConfig.Get((int)AttrEnum.ATK);
|
| | | playerProModel = PlayerPropertyConfig.Get((int)PropertyType.ATK);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | foreach (var attrId in itemEffectDict.Keys)
|
| | | {
|
| | | var attrValue = itemEffectDict[attrId];
|
| | | switch ((AttrEnum)attrId)
|
| | | switch ((PropertyType)attrId)
|
| | | {
|
| | | case AttrEnum.ATK:
|
| | | case PropertyType.ATK:
|
| | | atk += attrValue;
|
| | | break;
|
| | | case AttrEnum.HP:
|
| | | case PropertyType.HP:
|
| | | hp += attrValue;
|
| | | break;
|
| | | case AttrEnum.DEF:
|
| | | case PropertyType.DEF:
|
| | | def += attrValue;
|
| | | break;
|
| | | case AttrEnum.HorseAtkPer:
|
| | | case PropertyType.HorseAtkPer:
|
| | | float mountAtk = mountDatas.GetAllMountAttack();
|
| | | atk += Mathf.RoundToInt(mountAtk * ((float)attrValue / 10000));
|
| | | break;
|
| | | case AttrEnum.StoneBasePer:
|
| | | case PropertyType.StoneBasePer:
|
| | | var stoneDict = GetStoneAttrDict();
|
| | | foreach (var key in stoneDict.Keys)
|
| | | {
|
| | | var stoneValue = stoneDict[key];
|
| | | switch ((AttrEnum)key)
|
| | | switch ((PropertyType)key)
|
| | | {
|
| | | case AttrEnum.ATK:
|
| | | case PropertyType.ATK:
|
| | | atk += Mathf.RoundToInt(stoneValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | case AttrEnum.HP:
|
| | | case PropertyType.HP:
|
| | | hp += Mathf.RoundToInt(stoneValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | case AttrEnum.DEF:
|
| | | case PropertyType.DEF:
|
| | | def += Mathf.RoundToInt(stoneValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case AttrEnum.RealmBasePer:
|
| | | case PropertyType.RealmBasePer:
|
| | | var realmDict = GetRealmAttrDict();
|
| | | foreach (var key in realmDict.Keys)
|
| | | {
|
| | | var realmValue = realmDict[key];
|
| | | switch ((AttrEnum)key)
|
| | | switch ((PropertyType)key)
|
| | | {
|
| | | case AttrEnum.ATK:
|
| | | case PropertyType.ATK:
|
| | | atk += Mathf.RoundToInt(realmValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | case AttrEnum.HP:
|
| | | case PropertyType.HP:
|
| | | hp += Mathf.RoundToInt(realmValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | case AttrEnum.DEF:
|
| | | case PropertyType.DEF:
|
| | | def += Mathf.RoundToInt(realmValue * ((float)attrValue / 10000));
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case AttrEnum.PetSkillAtkRate:
|
| | | case PropertyType.PetSkillAtkRate:
|
| | | break;
|
| | | case AttrEnum.PlusBaseAtkPer:
|
| | | case PropertyType.PlusBaseAtkPer:
|
| | | var strengthDict = GetStrengthAttrDict();
|
| | | if (strengthDict.ContainsKey((int)AttrEnum.ATK))
|
| | | if (strengthDict.ContainsKey((int)PropertyType.ATK))
|
| | | {
|
| | | var strengthValue = strengthDict[(int)AttrEnum.ATK];
|
| | | var strengthValue = strengthDict[(int)PropertyType.ATK];
|
| | | atk += Mathf.RoundToInt(strengthValue * ((float)attrValue / 10000));
|
| | | }
|
| | | break;
|
| | |
| | |
|
| | | if (atk > 0)
|
| | | {
|
| | | attrDict.Add((int)AttrEnum.ATK, atk);
|
| | | attrDict.Add((int)PropertyType.ATK, atk);
|
| | | }
|
| | |
|
| | | if (def > 0)
|
| | | {
|
| | | attrDict.Add((int)AttrEnum.DEF, def);
|
| | | attrDict.Add((int)PropertyType.DEF, def);
|
| | | }
|
| | |
|
| | | if (hp > 0)
|
| | | {
|
| | | attrDict.Add((int)AttrEnum.HP, hp);
|
| | | attrDict.Add((int)PropertyType.HP, hp);
|
| | | }
|
| | |
|
| | | fightPower = UIHelper.GetFightPower(attrDict);
|
| | |
| | | string minAtkValue = "";
|
| | | attrNamelist[code].gameObject.SetActive(true);
|
| | | attrValuelist[code].gameObject.SetActive(true);
|
| | | switch ((AttrEnum)attrIdlist[i])
|
| | | switch ((PropertyType)attrIdlist[i])
|
| | | {
|
| | | case AttrEnum.MinAtk:
|
| | | case PropertyType.MinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMinAtk:
|
| | | case PropertyType.PetMinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMaxAtk:
|
| | | case AttrEnum.MaxAtk:
|
| | | case PropertyType.PetMaxAtk:
|
| | | case PropertyType.MaxAtk:
|
| | | tipsModel.SetPetAttrStr(attrIdlist[i - 1], itemEffectDict[attrIdlist[i - 1]], out minAtkName, out minAtkValue);
|
| | | tipsModel.SetPetAttrStr(attrIdlist[i], itemEffectDict[attrIdlist[i]], out attrName, out attrValue, minAtkValue);
|
| | | code += 1;
|
| | |
| | |
|
| | | public static ItemModel itemModel = null;
|
| | | private ItemConfig itemConfig = null;
|
| | | private AttrEnum selectAttr = AttrEnum.POWER;
|
| | | private PropertyType selectAttr = PropertyType.POWER;
|
| | |
|
| | | float washPoint = 0;
|
| | |
|
| | |
| | | {
|
| | | if (strenToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.POWER;
|
| | | selectAttr = PropertyType.POWER;
|
| | | }
|
| | | else if (agilityToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.AGILITY;
|
| | | selectAttr = PropertyType.AGILITY;
|
| | | }
|
| | | else if (physiqueToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.PHYSIQUE;
|
| | | selectAttr = PropertyType.PHYSIQUE;
|
| | | }
|
| | | else if (mentAlityToggle.isOn)
|
| | | {
|
| | | selectAttr = AttrEnum.MENTALITY;
|
| | | selectAttr = PropertyType.MENTALITY;
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshWashAttrDes()
|
| | | {
|
| | | var model = ModelCenter.Instance.GetModel<RolePointModel>();
|
| | | Dictionary<int, int> dict = null;
|
| | | bool isContain = model.TryGetPointInit(PlayerDatas.Instance.baseData.Job,out dict);
|
| | | float initPoint = 0;
|
| | | if(isContain && dict.ContainsKey((int)selectAttr))
|
| | | {
|
| | | initPoint = dict[(int)selectAttr];
|
| | | }
|
| | | switch (selectAttr)
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.BaseSTR) - initPoint;
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.BasePHY) - initPoint;
|
| | | break;
|
| | | case AttrEnum.PHYSIQUE:
|
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.BaseCON) - initPoint;
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.BasePNE) - initPoint;
|
| | | break;
|
| | | }
|
| | |
|
| | | var model = ModelCenter.Instance.GetModel<ReikiRootModel>();
|
| | | washPoint = model.GetReikiRootFreePoint((int)selectAttr);
|
| | | PlayerPropertyConfig propertyConfig = PlayerPropertyConfig.Get((int)selectAttr);
|
| | | washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint);
|
| | | }
|
| | |
| | | }
|
| | | float addHp = 0;
|
| | | float addAtk = 0;
|
| | | if (addAttrDict510.ContainsKey((int)AttrEnum.HP))
|
| | | if (addAttrDict510.ContainsKey((int)PropertyType.HP))
|
| | | {
|
| | | addHp += addAttrDict510[(int)AttrEnum.HP];
|
| | | addHp += addAttrDict510[(int)PropertyType.HP];
|
| | | }
|
| | | if (addAttrDict511.ContainsKey((int)AttrEnum.HP))
|
| | | if (addAttrDict511.ContainsKey((int)PropertyType.HP))
|
| | | {
|
| | | addHp += addAttrDict511[(int)AttrEnum.HP];
|
| | | addHp += addAttrDict511[(int)PropertyType.HP];
|
| | | }
|
| | |
|
| | | if (addAttrDict510.ContainsKey((int)AttrEnum.ATK))
|
| | | if (addAttrDict510.ContainsKey((int)PropertyType.ATK))
|
| | | {
|
| | | addAtk += addAttrDict510[(int)AttrEnum.ATK];
|
| | | addAtk += addAttrDict510[(int)PropertyType.ATK];
|
| | | }
|
| | | if (addAttrDict511.ContainsKey((int)AttrEnum.ATK))
|
| | | if (addAttrDict511.ContainsKey((int)PropertyType.ATK))
|
| | | {
|
| | | addAtk += addAttrDict511[(int)AttrEnum.ATK];
|
| | | addAtk += addAttrDict511[(int)PropertyType.ATK];
|
| | | }
|
| | | m_HpTxt.text = ((int)(_HPP /*+ dicStone[6]*/ + addHp)).ToString();
|
| | | m_AtkTxt.text = ((int)(_AttT /*+ dicStone[7]*/ + addAtk)).ToString();
|
| | |
| | | sumFight += _scoreNumAll;
|
| | | }
|
| | | allFightText.text = (sumFight + InitFightPower).ToString();
|
| | | attackSpeed.text = ((float)UIHelper.GetPropertyMapPlayerData(AttrEnum.ATKSPEED) / 100).ToString();
|
| | | attackSpeed.text = ((float)UIHelper.GetPropertyMapPlayerData(PropertyType.ATKSPEED) / 100).ToString();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | m_Property_Text.text = Language.Get("SpiritPetAttribute_Z");
|
| | | curPetHitText.text = _tagPetClass.AtkAdd.ToString();//攻击力
|
| | | m_LVtext.text = _PetBackpack.PetClass + Language.Get("Z1041");
|
| | | float AtkNum = (float)UIHelper.GetPropertyMapPlayerData(AttrEnum.ATKSPEED) / 100;
|
| | | float AtkNum = (float)UIHelper.GetPropertyMapPlayerData(PropertyType.ATKSPEED) / 100;
|
| | | curPetAttackSpeedText.text = ((float)Math.Round(AtkNum, 1)).ToString();
|
| | |
|
| | | PetInfoConfig config = PetInfoConfig.Get(petmodel.curPetId);
|
| | |
| | |
|
| | | public readonly Redpoint levelUpRedpoint = new Redpoint(114, 11401);
|
| | | public readonly Redpoint challengeRedpoint = new Redpoint(114, 11402);
|
| | | public readonly Redpoint realmPoolRedpoint = new Redpoint(114, 11403);
|
| | |
|
| | | int m_SelectRealm = 0;
|
| | | public int selectRealm
|
| | |
| | |
|
| | | bool redpointDirty = false;
|
| | |
|
| | | bool serverInited = false;
|
| | |
|
| | | public List<int> displayRealms = new List<int>();
|
| | |
|
| | | public int displayRealmLevel
|
| | |
| | |
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | ActivitiesPushModel pushModel { get { return ModelCenter.Instance.GetModel<ActivitiesPushModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | isBossPass = false;
|
| | | expStartTime = DateTime.Now;
|
| | | startExp = 0;
|
| | | serverInited = false;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | redpointDirty = true;
|
| | | serverInited = true;
|
| | |
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent += OnSystemNotifyEvent;
|
| | |
| | | {
|
| | | RefreshRedpoint();
|
| | | redpointDirty = false;
|
| | | }
|
| | | if (serverInited)
|
| | | {
|
| | | RefreshRealmPoolRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | public void TryPushRealmPoolMessage()
|
| | | {
|
| | | var remainTime = 0f;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm))
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | if (realmLevel >= realmPoolOpenLevel)
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | if (exp < config.expLimit)
|
| | | {
|
| | | remainTime = realmExpTime * ((config.expLimit - exp) / (float)config.expRate);
|
| | | }
|
| | | }
|
| | | }
|
| | | if (remainTime > 0f)
|
| | | {
|
| | | var json = pushModel.GetPushJsonData(11403, (int)remainTime,
|
| | | Language.Get("RealmPoolGeTui_Title"), Language.Get("RealmPoolGeTui_Content"));
|
| | | pushModel.SendPushInfo(json);
|
| | | }
|
| | | else
|
| | | {
|
| | | pushModel.RemovePushInfo(11403);
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HA311_tagMCSyncRealmInfo package)
|
| | | {
|
| | | isBossPass = package.IsPass == 1;
|
| | |
| | | {
|
| | | realmExpRefresh();
|
| | | }
|
| | | RefreshRealmPoolRedpoint();
|
| | |
|
| | | TryPushRealmPoolMessage();
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | |
| | |
|
| | | levelUpRedpoint.state = levelUpable ? RedPointState.Simple : RedPointState.None;
|
| | | challengeRedpoint.state = challengeable ? RedPointState.Simple : RedPointState.None;
|
| | |
|
| | | RefreshRealmPoolRedpoint();
|
| | | }
|
| | |
|
| | | void RefreshRealmPoolRedpoint()
|
| | | {
|
| | | var isPoolFull = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Realm))
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | if (realmLevel >= realmPoolOpenLevel)
|
| | | {
|
| | | var config = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (totalExp >= config.expLimit)
|
| | | {
|
| | | isPoolFull = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | realmPoolRedpoint.state = isPoolFull ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | [SerializeField] Transform m_Lock;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Button m_TakeExp;
|
| | | [SerializeField] UIEffect m_CollectEffect;
|
| | | [SerializeField] UIEffect m_FullEffect;
|
| | |
|
| | | int realmLevel = 0;
|
| | |
|
| | |
| | | DisplayProgress();
|
| | | }
|
| | |
|
| | | DisplayEffect();
|
| | |
|
| | | model.realmExpRefresh -= RealmExpRefresh;
|
| | | model.realmExpRefresh += RealmExpRefresh;
|
| | |
|
| | |
| | | var progressInt = (int)(progress * 100);
|
| | | m_Progress.text = StringUtility.Contact(progressInt, "%");
|
| | | DisplayWave();
|
| | | DisplayEffect();
|
| | | }
|
| | |
|
| | | public void DisplayWave()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void DisplayEffect()
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | var isOpen = config.expRate != 0;
|
| | | var isFull = model.totalExp >= config.expLimit;
|
| | | if (!isOpen)
|
| | | {
|
| | | StopEffect(m_FullEffect);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (isFull)
|
| | | {
|
| | | StopEffect(m_CollectEffect);
|
| | | PlayEffect(m_FullEffect);
|
| | | }
|
| | | else
|
| | | {
|
| | | StopEffect(m_FullEffect);
|
| | | PlayEffect(m_CollectEffect);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void StopEffect(UIEffect effect)
|
| | | {
|
| | | if (effect.IsPlaying)
|
| | | {
|
| | | effect.StopImediatly();
|
| | | }
|
| | | }
|
| | |
|
| | | void PlayEffect(UIEffect effect)
|
| | | {
|
| | | if (!effect.IsPlaying)
|
| | | {
|
| | | effect.Play();
|
| | | }
|
| | | }
|
| | |
|
| | | private void PerSecond()
|
| | | {
|
| | | DisplayProgress();
|
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class ReikiRootModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, int> m_ReikiRootPoints = new Dictionary<int, int>();
|
| | | Dictionary<int, int> m_ReikiRootFreePoints = new Dictionary<int, int>();
|
| | | Dictionary<int, List<int>> m_RecommendReikiRoots = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, Dictionary<int, float>> m_RecommendProportion = new Dictionary<int, Dictionary<int, float>>();
|
| | | Dictionary<int, int> m_MainReikiRoots = new Dictionary<int, int>();
|
| | | Dictionary<int, int> m_CacheReikiRootPoints = new Dictionary<int, int>();
|
| | |
|
| | | public List<int> reikiRoots = new List<int>();
|
| | |
|
| | | public int freePoint
|
| | | {
|
| | | get
|
| | | {
|
| | | return (int)PlayerDatas.Instance.baseData.FreePoint;
|
| | | }
|
| | | }
|
| | |
|
| | | int m_CacheFreePoint = 0;
|
| | | public int cacheFreePoint
|
| | | {
|
| | | get { return m_CacheFreePoint; }
|
| | | set
|
| | | {
|
| | | if (m_CacheFreePoint != value)
|
| | | {
|
| | | m_CacheFreePoint = value;
|
| | | if (onCacheFreePointRefresh != null)
|
| | | {
|
| | | onCacheFreePointRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int mainReikiRoot
|
| | | {
|
| | | get
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | return m_MainReikiRoots[job];
|
| | | }
|
| | | }
|
| | |
|
| | | public int maxQuality { get; private set; }
|
| | |
|
| | | public const int FUNCTION = 36;
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(10101, 1010101); |
| | |
|
| | | public event Action onCacheFreePointRefresh;
|
| | | public event Action onReikiRootPointRefresh;
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | |
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | m_ReikiRootPoints.Clear();
|
| | | m_ReikiRootFreePoints.Clear();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | RefreshReikiRootPoint();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | var funcConfig = FuncConfigConfig.Get("RecommendPoint");
|
| | | var json = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
|
| | | foreach (var jobKey in json.Keys)
|
| | | {
|
| | | var job = int.Parse(jobKey);
|
| | | var _mainReikiRoot = 0;
|
| | | var _proportion = 0f;
|
| | | m_RecommendProportion.Add(job, new Dictionary<int, float>());
|
| | | foreach (var idKey in json[jobKey].Keys)
|
| | | {
|
| | | var id = int.Parse(idKey);
|
| | | var proportion = int.Parse(json[jobKey][idKey].ToString()) / 100f;
|
| | | if (proportion > _proportion)
|
| | | {
|
| | | _mainReikiRoot = id;
|
| | | _proportion = proportion;
|
| | | }
|
| | | m_RecommendProportion[job].Add(id, proportion);
|
| | | }
|
| | | m_MainReikiRoots.Add(job, _mainReikiRoot);
|
| | | m_RecommendReikiRoots.Add(job, new List<int>(m_RecommendProportion[job].Keys));
|
| | | }
|
| | |
|
| | | var config = ReikiRootConfig.GetValues()[0];
|
| | | maxQuality = config.qualityArea.Length;
|
| | |
|
| | | reikiRoots.Add((int)PropertyType.Mater);
|
| | | reikiRoots.Add((int)PropertyType.Wood);
|
| | | reikiRoots.Add((int)PropertyType.Water);
|
| | | reikiRoots.Add((int)PropertyType.Fire);
|
| | | reikiRoots.Add((int)PropertyType.Earth);
|
| | |
|
| | | }
|
| | |
|
| | | public int GetReikiRootQuality(int id, int point)
|
| | | {
|
| | | var config = ReikiRootConfig.Get(id);
|
| | | if (config == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var quality = 0;
|
| | | for (int i = 0; i < config.qualityArea.Length; i++)
|
| | | {
|
| | | if (point >= config.qualityArea[i])
|
| | | {
|
| | | quality = i + 1;
|
| | | }
|
| | | else
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | return quality;
|
| | | }
|
| | |
|
| | | public int GetReikiRootQuality(int id)
|
| | | {
|
| | | return GetReikiRootQuality(id, GetReikiRootPoint(id));
|
| | | }
|
| | |
|
| | | public int GetReikiRootPoint(int id)
|
| | | {
|
| | | return m_ReikiRootPoints.ContainsKey(id) ? m_ReikiRootPoints[id] : 0;
|
| | | }
|
| | |
|
| | | public int GetReikiRootFreePoint(int id)
|
| | | {
|
| | | return m_ReikiRootFreePoints.ContainsKey(id) ? m_ReikiRootFreePoints[id] : 0;
|
| | | }
|
| | |
|
| | | int GetReikiRootCachePoint(int id)
|
| | | {
|
| | | return m_CacheReikiRootPoints.ContainsKey(id) ? m_CacheReikiRootPoints[id] : 0;
|
| | | }
|
| | |
|
| | | public List<ReikiRootRecommend> GetReikiRootRecommendPoint(int point)
|
| | | {
|
| | | if (point == 0)
|
| | | {
|
| | | return null;
|
| | | }
|
| | |
|
| | | m_CacheReikiRootPoints.Clear();
|
| | | foreach (var id in m_ReikiRootPoints.Keys)
|
| | | {
|
| | | m_CacheReikiRootPoints[id] = m_ReikiRootPoints[id];
|
| | | }
|
| | |
|
| | | var recommends = new List<ReikiRootRecommend>();
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | var remainPoint = point;
|
| | | var currentMaxQuality = 1;
|
| | |
|
| | | foreach (var id in reikiRoots)
|
| | | {
|
| | | var quality = GetReikiRootQuality(id);
|
| | | if (quality >= currentMaxQuality)
|
| | | {
|
| | | currentMaxQuality = quality;
|
| | | }
|
| | | }
|
| | |
|
| | | if (m_RecommendReikiRoots.ContainsKey(job))
|
| | | {
|
| | | var reikiRoots = m_RecommendReikiRoots[job];
|
| | | while (remainPoint > 0)
|
| | | {
|
| | | reikiRoots.Sort(QualityCompare);
|
| | | var id = reikiRoots[0];
|
| | | var quality = GetReikiRootQuality(id, m_CacheReikiRootPoints[id]);
|
| | | var addpoint = 0;
|
| | | if (quality >= maxQuality)
|
| | | {
|
| | | var proportions = m_RecommendProportion[job];
|
| | | foreach (var key in proportions.Keys)
|
| | | {
|
| | | addpoint = Mathf.RoundToInt(remainPoint * proportions[key]);
|
| | | recommends.Add(new ReikiRootRecommend()
|
| | | {
|
| | | id = key,
|
| | | value = addpoint,
|
| | | });
|
| | | if (!m_CacheReikiRootPoints.ContainsKey(key))
|
| | | {
|
| | | m_CacheReikiRootPoints.Add(key, 0);
|
| | | }
|
| | | m_CacheReikiRootPoints[key] += addpoint;
|
| | | }
|
| | | remainPoint = 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | addpoint = Mathf.Min(remainPoint, GetCacheQualityRequrePoint(id,
|
| | | quality < currentMaxQuality ? currentMaxQuality : quality + 1));
|
| | | remainPoint -= addpoint;
|
| | | recommends.Add(new ReikiRootRecommend()
|
| | | {
|
| | | id = id,
|
| | | value = addpoint,
|
| | | });
|
| | | if (!m_CacheReikiRootPoints.ContainsKey(id))
|
| | | {
|
| | | m_CacheReikiRootPoints.Add(id, 0);
|
| | | }
|
| | | m_CacheReikiRootPoints[id] += addpoint;
|
| | | }
|
| | | }
|
| | | }
|
| | | return recommends;
|
| | | }
|
| | |
|
| | | int GetCacheQualityRequrePoint(int id,int quality)
|
| | | {
|
| | | var requirePoint = 0;
|
| | | var currebtQuality = GetReikiRootQuality(id, GetReikiRootCachePoint(id));
|
| | | if (currebtQuality < quality)
|
| | | {
|
| | | var point = GetReikiRootCachePoint(id);
|
| | | requirePoint = GetQualityPoint(id, quality) - point;
|
| | | }
|
| | | return requirePoint;
|
| | | }
|
| | |
|
| | | public int GetQualityPoint(int id, int quality)
|
| | | {
|
| | | var config = ReikiRootConfig.Get(id);
|
| | | for (int i = 0; i < config.qualityArea.Length; i++)
|
| | | {
|
| | | if (quality == i + 1)
|
| | | {
|
| | | return config.qualityArea[i];
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public void GetReikiRootProperty(int id, int point, ref Dictionary<int, int> propertyDict)
|
| | | {
|
| | | var config = ReikiRootConfig.Get(id);
|
| | |
|
| | | if (!propertyDict.ContainsKey(config.propertyPerPoint.x))
|
| | | {
|
| | | propertyDict.Add(config.propertyPerPoint.x, 0);
|
| | | }
|
| | | propertyDict[config.propertyPerPoint.x] += config.propertyPerPoint.y * point;
|
| | |
|
| | | if (!propertyDict.ContainsKey(config.promoteProperty))
|
| | | {
|
| | | propertyDict.Add(config.promoteProperty, 0);
|
| | | }
|
| | | var quality = GetReikiRootQuality(id, point);
|
| | | propertyDict[config.promoteProperty] += GetQualityProperty(id, quality);
|
| | | }
|
| | |
|
| | | public int GetQualityProperty(int id, int quality)
|
| | | {
|
| | | var config = ReikiRootConfig.Get(id);
|
| | | var value = 0;
|
| | | for (int i = 0; i < config.promoteValue.Length; i++)
|
| | | {
|
| | | if (quality > i)
|
| | | {
|
| | | value = config.promoteValue[i];
|
| | | }
|
| | | else
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | return value;
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HB107_tagMCRolePointInfo package)
|
| | | {
|
| | | for (int i = 0; i < package.PointAttrIDCount; i++)
|
| | | {
|
| | | var id = package.PointAttrIDList[i];
|
| | | var point = package.PointValueList[i];
|
| | | m_ReikiRootFreePoints[id] = point;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendAddPoint(byte[] points, ushort[] pointValues)
|
| | | {
|
| | | var pak = new CB206_tagCMAddPoint();
|
| | | pak.PointAttrIDList = points;
|
| | | pak.PointValueList = pointValues;
|
| | | pak.PointAttrIDCount = (byte)points.Length;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | int QualityCompare(int lhs, int rhs)
|
| | | {
|
| | | var lhsQuality = GetReikiRootQuality(lhs, GetReikiRootCachePoint(lhs));
|
| | | var rhsQuality = GetReikiRootQuality(rhs, GetReikiRootCachePoint(rhs));
|
| | | if (lhs != rhs)
|
| | | {
|
| | | if (mainReikiRoot == lhs || mainReikiRoot == rhs)
|
| | | {
|
| | | if (lhsQuality == rhsQuality)
|
| | | {
|
| | | return mainReikiRoot == lhs ? -1 : 1;
|
| | | }
|
| | | }
|
| | | }
|
| | | return lhsQuality.CompareTo(rhsQuality);
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | switch (dataType)
|
| | | {
|
| | | case PlayerDataType.CDBPlayerRefresh_Mater:
|
| | | case PlayerDataType.CDBPlayerRefresh_Wood:
|
| | | case PlayerDataType.CDBPlayerRefresh_Water:
|
| | | case PlayerDataType.CDBPlayerRefresh_Fire:
|
| | | case PlayerDataType.CDBPlayerRefresh_Earth:
|
| | | RefreshReikiRootPoint();
|
| | | break;
|
| | | case PlayerDataType.FreePoint:
|
| | | RefreshRedpoint();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | void RefreshReikiRootPoint()
|
| | | {
|
| | | foreach (var id in reikiRoots)
|
| | | {
|
| | | m_ReikiRootPoints[id] = (int)UIHelper.GetPropertyMapPlayerData((PropertyType)id);
|
| | | }
|
| | | if (onReikiRootPointRefresh != null)
|
| | | {
|
| | | onReikiRootPointRefresh();
|
| | | }
|
| | | }
|
| | |
|
| | | void RefreshRedpoint()
|
| | | {
|
| | | var existFreePoint = false;
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.ReikiRoot))
|
| | | {
|
| | | existFreePoint = freePoint > 0;
|
| | | }
|
| | | redpoint.state = existFreePoint ? RedPointState.Simple : RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public struct ReikiRootRecommend
|
| | | {
|
| | | public int id;
|
| | | public int value;
|
| | | }
|
| | | } |
| | | |
| | | |
| File was renamed from System/Role/RolePointModel.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0e26857000300af4a8cceca9ddf5a553 |
| | | timeCreated: 1540277852 |
| | | guid: bf54066f835418b4c9f377706c85b4ad |
| | | timeCreated: 1553479811 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class ReikiRootPointBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text m_PropertyName;
|
| | | [SerializeField] Text m_PropertyValue;
|
| | | [SerializeField] Text m_Point;
|
| | | [SerializeField] Button m_Add;
|
| | | [SerializeField] Button m_Sub;
|
| | | [SerializeField] Button m_OpenKeyboard;
|
| | |
|
| | | public int id { get; private set; }
|
| | |
|
| | | int m_CachePoint = 0;
|
| | | public int point
|
| | | {
|
| | | get { return m_CachePoint; }
|
| | | set
|
| | | {
|
| | | if (m_CachePoint != value)
|
| | | {
|
| | | m_CachePoint = value;
|
| | | DisplayPoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public RectTransform openKeyboardBottom
|
| | | {
|
| | | get { return m_OpenKeyboard.transform as RectTransform; }
|
| | | }
|
| | |
|
| | | ReikiRootWin parent = null;
|
| | |
|
| | | Coroutine m_Coroutine = null;
|
| | |
|
| | | bool isPointAdd = false;
|
| | | bool isPointSub = false;
|
| | |
|
| | | int coroutineCount = 0;
|
| | |
|
| | | static WaitForSeconds waitSpeedFaster = new WaitForSeconds(0.05f);
|
| | | static WaitForSeconds waitSpeedSlow = new WaitForSeconds(0.2f);
|
| | |
|
| | | ReikiRootModel model { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | UIEventTrigger.Get(m_Sub.gameObject).OnDown = OnSubDown;
|
| | | UIEventTrigger.Get(m_Sub.gameObject).OnUp = OnSubUp;
|
| | | UIEventTrigger.Get(m_Add.gameObject).OnDown = OnAddDown;
|
| | | UIEventTrigger.Get(m_Add.gameObject).OnUp = OnAddUp;
|
| | | m_OpenKeyboard.AddListener(OpenKeyboard);
|
| | | }
|
| | |
|
| | | public void Display(ReikiRootWin win, int id)
|
| | | {
|
| | | parent = win;
|
| | | this.id = id;
|
| | | DisplayBase();
|
| | | DisplayPoint();
|
| | |
|
| | | model.onReikiRootPointRefresh += OnReikiRootPointRefresh;
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | | {
|
| | | var propertyConfig = PlayerPropertyConfig.Get(id);
|
| | | m_PropertyName.text = propertyConfig.Name;
|
| | | var qualiaty = model.GetReikiRootQuality(id);
|
| | | m_PropertyName.color = UIHelper.GetUIColor(qualiaty, true);
|
| | | m_PropertyValue.text = UIHelper.GetPropertyMapPlayerData((PropertyType)id).ToString();
|
| | | }
|
| | |
|
| | | void DisplayPoint()
|
| | | {
|
| | | m_Point.text = point.ToString();
|
| | | }
|
| | |
|
| | | private void OnAddDown(GameObject go)
|
| | | {
|
| | | isPointAdd = true;
|
| | | coroutineCount = 0;
|
| | | if (m_Coroutine != null)
|
| | | {
|
| | | StopCoroutine(m_Coroutine);
|
| | | }
|
| | | m_Coroutine = StartCoroutine(Co_PointRefresh(true));
|
| | | }
|
| | |
|
| | | private void OnAddUp(GameObject go)
|
| | | {
|
| | | isPointAdd = false;
|
| | | }
|
| | |
|
| | | private void OnSubDown(GameObject go)
|
| | | {
|
| | | if (m_Coroutine != null)
|
| | | {
|
| | | StopCoroutine(m_Coroutine);
|
| | | }
|
| | | coroutineCount = 0;
|
| | | isPointSub = true;
|
| | | m_Coroutine = StartCoroutine(Co_PointRefresh(false));
|
| | | }
|
| | |
|
| | | private void OnSubUp(GameObject go)
|
| | | {
|
| | | isPointSub = false;
|
| | | }
|
| | |
|
| | | IEnumerator Co_PointRefresh(bool pointUp)
|
| | | {
|
| | | while (pointUp ? isPointAdd : isPointSub)
|
| | | {
|
| | | if (pointUp && model.cacheFreePoint > 0)
|
| | | {
|
| | | point += 1;
|
| | | model.cacheFreePoint -= 1;
|
| | | }
|
| | | else if (!pointUp && point > 0)
|
| | | {
|
| | | point -= 1;
|
| | | model.cacheFreePoint += 1;
|
| | | }
|
| | | if (coroutineCount == 0)
|
| | | {
|
| | | yield return waitSpeedSlow;
|
| | | }
|
| | | else
|
| | | {
|
| | | yield return waitSpeedFaster;
|
| | | }
|
| | | coroutineCount++;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnReikiRootPointRefresh()
|
| | | {
|
| | | DisplayBase();
|
| | | }
|
| | |
|
| | | private void OpenKeyboard()
|
| | | {
|
| | | if (parent != null)
|
| | | {
|
| | | parent.OpenKeyboard(this);
|
| | | }
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.onReikiRootPointRefresh -= OnReikiRootPointRefresh;
|
| | |
|
| | | if (m_Coroutine != null)
|
| | | {
|
| | | StopCoroutine(m_Coroutine);
|
| | | }
|
| | | isPointAdd = false;
|
| | | isPointSub = false;
|
| | | point = 0;
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| File was renamed from System/Role/AddPointBehaviour.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e12ce6e065f8801458ea82da575ad306 |
| | | timeCreated: 1540280577 |
| | | guid: 0fd76f95c6abcdf4992d799150ccce66 |
| | | timeCreated: 1553498324 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, March 25, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class ReikiRootWin : Window
|
| | | {
|
| | | [SerializeField] List<PropertyBehaviour> m_Propertys;
|
| | | [SerializeField] List<ReikiRootPointBehaviour> m_ReikiRootPoints;
|
| | | [SerializeField] RectTransform m_Container;
|
| | | [SerializeField] NumKeyBoard m_NumKeyboard;
|
| | | [SerializeField] Text m_FreePoint;
|
| | | [SerializeField] Button m_Recommend;
|
| | | [SerializeField] Button m_Confirm;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | Dictionary<int, int> currentPropertyDict = new Dictionary<int, int>();
|
| | | Dictionary<int, int> upPropertyDict = new Dictionary<int, int>();
|
| | |
|
| | | int openKeyboardId = 0;
|
| | |
|
| | | bool propertyRefreshDirty = false;
|
| | |
|
| | | const float refreshInterval = 0.5f;
|
| | | float timer = 0f;
|
| | |
|
| | | ReikiRootModel model { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Recommend.AddListener(OnRecommend);
|
| | | m_Confirm.AddListener(Confirm);
|
| | | m_Close.AddListener(CloseClick);
|
| | |
|
| | | m_NumKeyboard.onValueChange.AddListener(OnPointValChange);
|
| | | m_NumKeyboard.onConfirm.AddListener((bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | m_NumKeyboard.gameObject.SetActive(false);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.cacheFreePoint = model.freePoint;
|
| | | for (int i = 0; i < m_ReikiRootPoints.Count; i++)
|
| | | {
|
| | | if (i < model.reikiRoots.Count)
|
| | | {
|
| | | m_ReikiRootPoints[i].Display(this, model.reikiRoots[i]);
|
| | | }
|
| | | }
|
| | |
|
| | | m_NumKeyboard.gameObject.SetActive(false);
|
| | |
|
| | | model.onCacheFreePointRefresh += OnCacheFreePointRefresh;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
|
| | |
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.onCacheFreePointRefresh -= OnCacheFreePointRefresh;
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
|
| | | for (int i = 0; i < m_ReikiRootPoints.Count; i++)
|
| | | {
|
| | | m_ReikiRootPoints[i].Dispose();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void LateUpdate()
|
| | | {
|
| | | timer += Time.deltaTime;
|
| | | if (timer >= refreshInterval)
|
| | | {
|
| | | timer = 0f;
|
| | | if (propertyRefreshDirty)
|
| | | {
|
| | | DisplayProperty();
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayFreePoint();
|
| | | DisplayProperty();
|
| | | }
|
| | |
|
| | | void DisplayFreePoint()
|
| | | {
|
| | | m_FreePoint.text = model.cacheFreePoint.ToString();
|
| | | }
|
| | |
|
| | | void DisplayProperty()
|
| | | {
|
| | | currentPropertyDict.Clear();
|
| | | upPropertyDict.Clear();
|
| | |
|
| | | foreach (var reikiRootPoint in m_ReikiRootPoints)
|
| | | {
|
| | | var id = reikiRootPoint.id;
|
| | | var point = model.GetReikiRootPoint(id);
|
| | | model.GetReikiRootProperty(id, point, ref currentPropertyDict);
|
| | |
|
| | | var cachePoint = point + reikiRootPoint.point;
|
| | | model.GetReikiRootProperty(id, cachePoint, ref upPropertyDict);
|
| | | }
|
| | |
|
| | | var index = 0;
|
| | | foreach (var property in currentPropertyDict.Keys)
|
| | | {
|
| | | if (index < m_Propertys.Count)
|
| | | {
|
| | | m_Propertys[index].gameObject.SetActive(true);
|
| | | var value = currentPropertyDict[property];
|
| | | var add = upPropertyDict.ContainsKey(property) ?
|
| | | (upPropertyDict[property] - value) : 0;
|
| | | m_Propertys[index].DisplayUp(property, value, add);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_Propertys.Count; i++)
|
| | | {
|
| | | m_Propertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | public void OpenKeyboard(ReikiRootPointBehaviour behaviour)
|
| | | {
|
| | | openKeyboardId = behaviour.id;
|
| | | m_NumKeyboard.gameObject.SetActive(true);
|
| | | m_NumKeyboard.max = (uint)model.cacheFreePoint + (uint)behaviour.point;
|
| | | m_NumKeyboard.min = 0;
|
| | | var trans = behaviour.openKeyboardBottom;
|
| | | var worldpos = trans.TransformPoint(new Vector3(0, -trans.rect.height / 2, 0));
|
| | | var localpos = m_Container.InverseTransformPoint(worldpos);
|
| | | m_NumKeyboard.transform.localPosition = localpos;
|
| | | }
|
| | |
|
| | | private void OnPointValChange()
|
| | | {
|
| | | var behaviour = m_ReikiRootPoints.Find((x) =>
|
| | | {
|
| | | return x.id == openKeyboardId;
|
| | | });
|
| | |
|
| | | var cache = behaviour.point;
|
| | |
|
| | | int num = int.Parse(m_NumKeyboard.Value);
|
| | | if (model.cacheFreePoint + cache - num < 0)
|
| | | {
|
| | | num = model.cacheFreePoint + cache;
|
| | | }
|
| | |
|
| | | behaviour.point = num;
|
| | | model.cacheFreePoint = model.cacheFreePoint - num + cache;
|
| | |
|
| | | m_NumKeyboard.Value = num.ToString();
|
| | | }
|
| | |
|
| | | private void OnRecommend()
|
| | | {
|
| | | var recommends = model.GetReikiRootRecommendPoint(model.freePoint);
|
| | | if (recommends != null)
|
| | | {
|
| | | foreach (var reikiRootPoint in m_ReikiRootPoints)
|
| | | {
|
| | | var point = 0;
|
| | | var list = recommends.FindAll((x) =>
|
| | | {
|
| | | return x.id == reikiRootPoint.id;
|
| | | });
|
| | | if (list != null)
|
| | | {
|
| | | foreach (var recommend in list)
|
| | | {
|
| | | point += recommend.value;
|
| | | }
|
| | | }
|
| | | reikiRootPoint.point = point;
|
| | | }
|
| | | if (model.cacheFreePoint == 0)
|
| | | {
|
| | | OnCacheFreePointRefresh();
|
| | | }
|
| | | model.cacheFreePoint = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | private void Confirm()
|
| | | {
|
| | | if (model.freePoint != model.cacheFreePoint)
|
| | | {
|
| | | var ids = new byte[m_ReikiRootPoints.Count];
|
| | | var values = new ushort[m_ReikiRootPoints.Count];
|
| | | for (int i = 0; i < m_ReikiRootPoints.Count; i++)
|
| | | {
|
| | | ids[i] = (byte)m_ReikiRootPoints[i].id;
|
| | | values[i] = (ushort)m_ReikiRootPoints[i].point;
|
| | | }
|
| | | model.SendAddPoint(ids, values);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnCacheFreePointRefresh()
|
| | | {
|
| | | DisplayFreePoint();
|
| | | DisplayProperty();
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | if (dataType == PlayerDataType.FreePoint)
|
| | | {
|
| | | foreach (var reikiRootPoint in m_ReikiRootPoints)
|
| | | {
|
| | | reikiRootPoint.point = 0;
|
| | | }
|
| | | if (model.cacheFreePoint == model.freePoint)
|
| | | {
|
| | | OnCacheFreePointRefresh();
|
| | | }
|
| | | model.cacheFreePoint = model.freePoint;
|
| | | }
|
| | | else
|
| | | {
|
| | | propertyRefreshDirty = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Role/RolePointWin.cs.meta
copy to System/Role/ReikiRootWin.cs.meta
| File was copied from System/Role/RolePointWin.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d337657873ed5bb4bb61182d25e030e4 |
| | | timeCreated: 1540277803 |
| | | guid: d925264697762074988dcfbc6d29d623 |
| | | timeCreated: 1553498163 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | case ScrollerDataType.Header:
|
| | | {
|
| | | Text text = cell.transform.Find("Text").GetComponent<Text>();
|
| | | if ((AttrEnum)cfg.ID == AttrEnum.ATK)
|
| | | if ((PropertyType)cfg.ID == PropertyType.ATK)
|
| | | {
|
| | | text.text = StringUtility.Contact(cfg.Name, " ", "<color=#109d06>", UIHelper.ReplaceLargeNum(PlayerDatas.Instance.extersion.MINATK), "-", UIHelper.ReplaceLargeNum(PlayerDatas.Instance.extersion.MAXATK), "</color>");
|
| | | return;
|
| | | }
|
| | | else if ((AttrEnum)cfg.ID == AttrEnum.PetHurt)
|
| | | else if ((PropertyType)cfg.ID == PropertyType.PetHurt)
|
| | | {
|
| | | if (petmodel.MaxAtkNunber == 0)
|
| | | {
|
| | |
| | | }
|
| | | return;
|
| | | }
|
| | | text.text = StringUtility.Contact(cfg.Name, " ", "<color=#109d06>", UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(UIHelper.GetPropertyMapPlayerData((AttrEnum)cfg.ID), cfg.ISPercentage)), cfg.ISPercentage == 1 ? "%" : string.Empty, "</color>");
|
| | | text.text = StringUtility.Contact(cfg.Name, " ", "<color=#109d06>", UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(UIHelper.GetPropertyMapPlayerData((PropertyType)cfg.ID), cfg.ISPercentage)), cfg.ISPercentage == 1 ? "%" : string.Empty, "</color>");
|
| | | }
|
| | | break;
|
| | | case ScrollerDataType.Normal:
|
| | |
| | |
|
| | | private void OnPromoteClick()
|
| | | {
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.ReikiRoot))
|
| | | {
|
| | | WindowCenter.Instance.Open<RolePointWin>();
|
| | | WindowCenter.Instance.Open<ReikiRootWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.ReikiRoot);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | void OnUpdateBasicAttr()
|
| | | {
|
| | | m_PropertyAtk.text = StringUtility.Contact(ReplaceLargeNum((ulong)PlayerDatas.Instance.extersion.MINATK), "-", ReplaceLargeNum((ulong)PlayerDatas.Instance.extersion.MAXATK));
|
| | | m_PropertyHp.text = GetAttrStr(AttrEnum.HP);
|
| | | m_PropertyHit.text = GetAttrStr(AttrEnum.HIT);
|
| | | m_PropertyDef.text = GetAttrStr(AttrEnum.DEF);
|
| | | m_PropertyDodge.text = GetAttrStr(AttrEnum.MISS);
|
| | | m_PropertyHp.text = GetAttrStr(PropertyType.HP);
|
| | | m_PropertyHit.text = GetAttrStr(PropertyType.HIT);
|
| | | m_PropertyDef.text = GetAttrStr(PropertyType.DEF);
|
| | | m_PropertyDodge.text = GetAttrStr(PropertyType.MISS);
|
| | | }
|
| | |
|
| | | void OnUpdateSpecialAttr()
|
| | | {
|
| | | m_PropertyAtkSpeed.text = GetAttrStr(AttrEnum.ATKSPEED);
|
| | | m_PropertyMoveSpeed.text = GetAttrStr(AttrEnum.MoveSpeed);
|
| | | m_PropertyRealHurt.text = GetAttrStr(AttrEnum.RealHurt);
|
| | | m_PropertyRealDef.text = GetAttrStr(AttrEnum.RealResis);
|
| | | m_PropertyExtraHurt.text = GetAttrStr(AttrEnum.AddHurt);
|
| | | m_PropertyReduceHurt.text = GetAttrStr(AttrEnum.ReduceHurt);
|
| | | m_PropertyCritOdd.text = GetAttrStr(AttrEnum.CritChance);
|
| | | m_PropertyCritHurt.text = GetAttrStr(AttrEnum.CritHurt);
|
| | | m_PropertyCritHurtOdd.text = GetAttrStr(AttrEnum.HeartHit);
|
| | | m_PropertyCritHitHurt.text = GetAttrStr(AttrEnum.HeartHurt);
|
| | | m_PropertyAtkSpeed.text = GetAttrStr(PropertyType.ATKSPEED);
|
| | | m_PropertyMoveSpeed.text = GetAttrStr(PropertyType.MoveSpeed);
|
| | | m_PropertyRealHurt.text = GetAttrStr(PropertyType.RealHurt);
|
| | | m_PropertyRealDef.text = GetAttrStr(PropertyType.RealResis);
|
| | | m_PropertyExtraHurt.text = GetAttrStr(PropertyType.AddHurt);
|
| | | m_PropertyReduceHurt.text = GetAttrStr(PropertyType.ReduceHurt);
|
| | | m_PropertyCritOdd.text = GetAttrStr(PropertyType.CritChance);
|
| | | m_PropertyCritHurt.text = GetAttrStr(PropertyType.CritHurt);
|
| | | m_PropertyCritHurtOdd.text = GetAttrStr(PropertyType.HeartHit);
|
| | | m_PropertyCritHitHurt.text = GetAttrStr(PropertyType.HeartHurt);
|
| | | }
|
| | |
|
| | | private string GetAttrStr(AttrEnum type)
|
| | | private string GetAttrStr(PropertyType type)
|
| | | {
|
| | | PlayerPropertyConfig cfg = PlayerPropertyConfig.Get((int)type);
|
| | | float value = UIHelper.GetPropertyMapPlayerData(type);
|
| | |
| | | int[] values = horseUpConfig.AttrValue;
|
| | | for (int i = 0; i < propertys.Length; i++)
|
| | | {
|
| | | if (propertys[i] == (int)AttrEnum.ATK || propertys[i] == (int)AttrEnum.HP)
|
| | | if (propertys[i] == (int)PropertyType.ATK || propertys[i] == (int)PropertyType.HP)
|
| | | {
|
| | | if (!dict.ContainsKey(propertys[i]))
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (propertys[k] == (int)AttrEnum.MoveSpeed)
|
| | | if (propertys[k] == (int)PropertyType.MoveSpeed)
|
| | | {
|
| | | if (values[k] > propertyDict[propertys[k]])
|
| | | {
|
| | |
| | |
|
| | | RoleModel roleModel { get { return ModelCenter.Instance.GetModel<RoleModel>(); } }
|
| | |
|
| | | RolePointModel rolePointModel { get { return ModelCenter.Instance.GetModel<RolePointModel>(); } }
|
| | | ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
|
| | |
|
| | | #region 配置
|
| | | public Dictionary<int, int> wingLv2GenerDict = new Dictionary<int, int>();
|
| | |
| | | _id == methodData.fairyHeartRedpoint.id ||
|
| | | _id == realmModel.levelUpRedpoint.id ||
|
| | | _id == equipGemModel.redpoint.id ||
|
| | | _id == rolePointModel.redpoint.id)
|
| | | _id == reikiRootModel.redpoint.id)
|
| | | {
|
| | | CheckPromoteDetailEffect();
|
| | | }
|
| | |
| | | var dict = ItemLogicUtility.Instance.CheckBetterEquipByRealm();
|
| | | return dict != null && dict.Count > 0;
|
| | | case PromoteDetailType.AddPoint:
|
| | | return rolePointModel.redpoint.state == RedPointState.Simple;
|
| | | return reikiRootModel.redpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.EquipStrength:
|
| | | return false;
|
| | | case PromoteDetailType.Mount:
|
| | |
| | | if (requireProperty != 0)
|
| | | {
|
| | | var requirePropertyValue = skillConfig.RequirePropertyValue();
|
| | | if (UIHelper.GetPropertyMapPlayerData((AttrEnum)requireProperty) < requirePropertyValue)
|
| | | if (UIHelper.GetPropertyMapPlayerData((PropertyType)requireProperty) < requirePropertyValue)
|
| | | {
|
| | | error = 5;
|
| | | return false;
|
| | |
| | | {
|
| | | m_SelectConditions[index].gameObject.SetActive(true);
|
| | | var requirePropertyValue = skillConfig.RequirePropertyValue();
|
| | | var propertyValue = UIHelper.GetPropertyMapPlayerData((AttrEnum)requireProperty);
|
| | | var propertyValue = UIHelper.GetPropertyMapPlayerData((PropertyType)requireProperty);
|
| | | var requireDisplay = StringUtility.Contact(propertyValue, "/", requirePropertyValue);
|
| | | requireDisplay = UIHelper.AppendColor(propertyValue >= requirePropertyValue ?
|
| | | TextColType.Green : TextColType.Red, requireDisplay);
|
| | |
| | | [SerializeField]
|
| | | CanvasGroup tipAlpha;
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | |
| | | needPointDict.Clear();
|
| | | if (itemAttrData.itemConfig.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | float offset = 0;
|
| | |
| | | offset = needPointDict[needlist[i]] - UIHelper.GetPropertyMapPlayerData(needlist[i]);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if (itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | [SerializeField]
|
| | | CanvasGroup tipAlpha;
|
| | |
|
| | | Dictionary<AttrEnum, int> needPointDict = new Dictionary<AttrEnum, int>();
|
| | | Dictionary<PropertyType, int> needPointDict = new Dictionary<PropertyType, int>();
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | |
| | |
|
| | | if (itemAttrData.itemConfig.LimitSTR > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | needPointDict.Add(PropertyType.POWER, itemAttrData.itemConfig.LimitSTR);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPHY > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | needPointDict.Add(PropertyType.AGILITY, itemAttrData.itemConfig.LimitPHY);
|
| | | }
|
| | |
|
| | | if (itemAttrData.itemConfig.LimitPNE > 0)
|
| | | {
|
| | | needPointDict.Add(AttrEnum.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | needPointDict.Add(PropertyType.MENTALITY, itemAttrData.itemConfig.LimitPNE);
|
| | | }
|
| | |
|
| | | List<AttrEnum> needlist = needPointDict.Keys.ToList();
|
| | | List<PropertyType> needlist = needPointDict.Keys.ToList();
|
| | |
|
| | | int i = 0;
|
| | | float offset = 0;
|
| | |
| | | offset = needPointDict[needlist[i]] - UIHelper.GetPropertyMapPlayerData(needlist[i]);
|
| | | switch (needlist[i])
|
| | | {
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | if(itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | |
| | | SetNeedPointUI(1, 0, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS113"));
|
| | | }
|
| | | break;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | if(itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS112"));
|
| | |
| | | }
|
| | |
|
| | | break;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | if(itemAttrData.isHavePutLimit)
|
| | | {
|
| | | SetNeedPointUI(needPointDict[needlist[i]], offset, needPointTextlist[i], needPointNumlist[i], Language.Get("KnapS111"));
|
| | |
| | | string minAtkValue = "";
|
| | | attrNamelist[code].gameObject.SetActive(true);
|
| | | attrValuelist[code].gameObject.SetActive(true);
|
| | | switch ((AttrEnum)attrIdlist[i])
|
| | | switch ((PropertyType)attrIdlist[i])
|
| | | {
|
| | | case AttrEnum.MinAtk:
|
| | | case PropertyType.MinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMinAtk:
|
| | | case PropertyType.PetMinAtk:
|
| | | break;
|
| | | case AttrEnum.PetMaxAtk:
|
| | | case AttrEnum.MaxAtk:
|
| | | case PropertyType.PetMaxAtk:
|
| | | case PropertyType.MaxAtk:
|
| | | itemTipsModel.SetPetAttrStr(attrIdlist[i - 1], itemEffectDict[attrIdlist[i - 1]], out minAtkName, out minAtkValue);
|
| | | itemTipsModel.SetPetAttrStr(attrIdlist[i], itemEffectDict[attrIdlist[i]], out attrName, out attrValue, minAtkValue);
|
| | | code += 1;
|
| | |
| | | WindowCenter.Instance.Open<KnapSackWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.AddPoint:
|
| | | WindowCenter.Instance.Open<RolePointWin>();
|
| | | WindowCenter.Instance.Open<ReikiRootWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.EquipStrength:
|
| | | //WindowCenter.Instance.Open<EquipReinforceWin>();
|
| | |
| | | var _property = treasure.treasureStages[0].propertyDict.First();
|
| | | switch (_property.Key)
|
| | | {
|
| | | case (int)AttrEnum.KillMonsExpPrecent:
|
| | | case (int)PropertyType.KillMonsExpPrecent:
|
| | | m_AddedEffect.text = Language.Get("FairyTreasure_2", _property.Value / 100);
|
| | | break;
|
| | | case (int)AttrEnum.AddHurt:
|
| | | case (int)PropertyType.AddHurt:
|
| | | m_AddedEffect.text = Language.Get("FairyTreasure_3", _property.Value / 100);
|
| | | break;
|
| | | case 60:
|
| | |
| | | private void OnDragComplete(int result)
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding
|
| | | || WindowCenter.Instance.IsOpen<TreasureNewStageWin>()
|
| | | || WindowCenter.Instance.IsOpen<PotentialItemUseWin>()
|
| | | || WindowCenter.Instance.IsOpen<TreasureSoulActiveWin>()
|
| | | || WindowCenter.Instance.IsOpen<GetItemPathWin>()
|
| | | || WindowCenter.Instance.IsOpen<DemonTreasurePropertyWin>()
|
| | |
| | | RegisterModel<OpenServerActivityNotifyModel>();
|
| | | RegisterModel<FairyFeastModel>();
|
| | | RegisterModel<WishingPoolModel>();
|
| | | RegisterModel<RolePointModel>();
|
| | | RegisterModel<SocialModel>();
|
| | | RegisterModel<ChatBubbleModel>();
|
| | | RegisterModel<AccumulateRechargeModel>();
|
| | |
| | | RegisterModel<EquipStrengthModel>();
|
| | | RegisterModel<RuneModel>();
|
| | | RegisterModel<RuneResolveModel>();
|
| | | RegisterModel<ReikiRootModel>();
|
| | | RegisterModel<AuctionNewGetShowModel>();
|
| | | inited = true;
|
| | | }
|
| | |
| | | SetJumpLogic<RealmWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RolePoint:
|
| | | SetJumpLogic<RolePointWin>(_tagWinSearchModel.TABID);
|
| | | SetJumpLogic<ReikiRootWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.MainTask:
|
| | | TaskModel taskDatas = ModelCenter.Instance.GetModel<TaskModel>();
|
| | |
| | | SetJumpLogic<KnapSackWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenAddPoint:
|
| | | SetJumpLogic<RolePointWin>(_tagWinSearchModel.TABID);
|
| | | SetJumpLogic<ReikiRootWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenHourse:
|
| | | SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
|
| | |
| | | normalTasks.Add(new ConfigInitTask("EquipPlusEvolveConfig", () => { EquipPlusEvolveConfig.Init(); }, () => { return EquipPlusEvolveConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyValueConfig", () => { LegendPropertyValueConfig.Init(); }, () => { return LegendPropertyValueConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("LegendPropertyConfig", () => { LegendPropertyConfig.Init(); }, () => { return LegendPropertyConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitNameConfig", () => { EquipSuitNameConfig.Init(); }, () => { return EquipSuitNameConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitNameConfig", () => { EquipSuitNameConfig.Init(); }, () => { return EquipSuitNameConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("ReikiRootConfig", () => { ReikiRootConfig.Init(); }, () => { return ReikiRootConfig.inited; })); |
| | | } |
| | | |
| | | static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>(); |
| | |
| | | CDBPlayerRefresh_SoulCore = 198,//聚魂-核心环
|
| | | CDBPlayerRefresh_Honor = 199, //# 荣誉值
|
| | | CDBPlayerRefresh_ZhuxianRate = 200, //# 荣誉值
|
| | | CDBPlayerRefresh_ZhuxianHurtPer = 201, //# 荣誉值
|
| | | CDBPlayerRefresh_Mater = 201, //# 灵根属性-金
|
| | | CDBPlayerRefresh_Wood = 202,//# 灵根属性-木
|
| | | CDBPlayerRefresh_Water = 203,//# 灵根属性-水
|
| | | CDBPlayerRefresh_Fire = 204,//# 灵根属性-火
|
| | | CDBPlayerRefresh_Earth = 205,//# 灵根属性-土
|
| | | };
|
| | |
|
| | | /** 背包类型码定义 */
|
| | |
| | | EquipDecompose = 123, //装备分解
|
| | | TreasureFindHost = 124, //法宝认主
|
| | | Dogz = 138, //神兽
|
| | | AddPoint = 145,//加点
|
| | | ReikiRoot = 145,//灵根
|
| | | CrossServer = 157, //跨服天梯赛
|
| | | CrossServerBoss = 162,
|
| | | }
|
| | | //属性类型
|
| | | public enum AttrEnum
|
| | | public enum PropertyType
|
| | | {
|
| | | LV = 1,//等级
|
| | | POWER = 2, //力量
|
| | |
| | | SkillReducePerE = 113, //杏黄旗技能减伤百分比
|
| | | SkillReducePerF = 114, //嗜天斧技能减伤百分比
|
| | | SkillReducePerG = 115, //射日神弓技能减伤百分比
|
| | | Luck = 120,//气运
|
| | | Mater = 201,//金
|
| | | Wood = 202,//木
|
| | | Water = 203,//水
|
| | | Fire = 204,//火
|
| | | Earth = 205,//土
|
| | | }
|
| | |
|
| | | public enum TextColType
|
| | |
| | | /// </summary>
|
| | | /// <param name="type"></param>
|
| | | /// <returns></returns>
|
| | | public static float GetPropertyMapPlayerData(AttrEnum type)
|
| | | public static int GetPropertyMapPlayerData(PropertyType type)
|
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case AttrEnum.LV:
|
| | | case PropertyType.LV:
|
| | | return PlayerDatas.Instance.baseData.LV;
|
| | | case AttrEnum.POWER:
|
| | | case PropertyType.POWER:
|
| | | return PlayerDatas.Instance.baseData.STR;
|
| | | case AttrEnum.AGILITY:
|
| | | case PropertyType.AGILITY:
|
| | | return PlayerDatas.Instance.baseData.PHY;
|
| | | case AttrEnum.PHYSIQUE:
|
| | | case PropertyType.PHYSIQUE:
|
| | | return PlayerDatas.Instance.baseData.CON;
|
| | | case AttrEnum.MENTALITY:
|
| | | case PropertyType.MENTALITY:
|
| | | return PlayerDatas.Instance.baseData.PNE;
|
| | | case AttrEnum.HP:
|
| | | case PropertyType.HP:
|
| | | return (int)PlayerDatas.Instance.extersion.MaxHP;
|
| | | case AttrEnum.ATK:
|
| | | case PropertyType.ATK:
|
| | | return PlayerDatas.Instance.extersion.MAXATK;
|
| | | case AttrEnum.DEF:
|
| | | case PropertyType.DEF:
|
| | | return PlayerDatas.Instance.extersion.DEF;
|
| | | case AttrEnum.HIT:
|
| | | case PropertyType.HIT:
|
| | | return PlayerDatas.Instance.extersion.HIT;
|
| | | case AttrEnum.MISS:
|
| | | case PropertyType.MISS:
|
| | | return PlayerDatas.Instance.extersion.Miss;
|
| | | case AttrEnum.ATKSPEED:
|
| | | case PropertyType.ATKSPEED:
|
| | | return PlayerDatas.Instance.extersion.battleValEx1;
|
| | | case AttrEnum.CritChance:
|
| | | case PropertyType.CritChance:
|
| | | return PlayerDatas.Instance.extersion.SuperHitRate;
|
| | | case AttrEnum.CritHurt:
|
| | | case PropertyType.CritHurt:
|
| | | return PlayerDatas.Instance.extersion.SuperHit;
|
| | | case AttrEnum.CritResis:
|
| | | case PropertyType.CritResis:
|
| | | return PlayerDatas.Instance.extersion.SuperHitReduce;
|
| | | case AttrEnum.HeartHit:
|
| | | case PropertyType.HeartHit:
|
| | | return PlayerDatas.Instance.extersion.luckHitRate;
|
| | | case AttrEnum.HeartHurt:
|
| | | case PropertyType.HeartHurt:
|
| | | return PlayerDatas.Instance.extersion.luckHitVal;
|
| | | case AttrEnum.HeartResis:
|
| | | case PropertyType.HeartResis:
|
| | | return PlayerDatas.Instance.extersion.LuckyHitRateReduce;
|
| | | case AttrEnum.SkillHurt:
|
| | | case PropertyType.SkillHurt:
|
| | | return PlayerDatas.Instance.extersion.SkillAtkRate;
|
| | | case AttrEnum.AddHurt:
|
| | | case PropertyType.AddHurt:
|
| | | return PlayerDatas.Instance.extersion.DamagePer;
|
| | | case AttrEnum.ReduceHurt:
|
| | | case PropertyType.ReduceHurt:
|
| | | return PlayerDatas.Instance.extersion.damageReduceRate;
|
| | | case AttrEnum.LifeReply:
|
| | | case PropertyType.LifeReply:
|
| | | return PlayerDatas.Instance.extersion.HPRestorePer;
|
| | | case AttrEnum.HurtReflect:
|
| | | case PropertyType.HurtReflect:
|
| | | return PlayerDatas.Instance.extersion.DamageBackRate;
|
| | | case AttrEnum.MoveSpeed:
|
| | | case PropertyType.MoveSpeed:
|
| | | return PlayerDatas.Instance.extersion.SpeedValue;
|
| | | case AttrEnum.PetAddHurt:
|
| | | case PropertyType.PetAddHurt:
|
| | | return PlayerDatas.Instance.extersion.PetDamPer;
|
| | | case AttrEnum.RealHurt:
|
| | | case PropertyType.RealHurt:
|
| | | return PlayerDatas.Instance.extersion.realATK;
|
| | | case AttrEnum.RealResis:
|
| | | case PropertyType.RealResis:
|
| | | return PlayerDatas.Instance.extersion.realDEF;
|
| | | case AttrEnum.DefyDef:
|
| | | case PropertyType.DefyDef:
|
| | | return PlayerDatas.Instance.extersion.IgnoreDefRate;
|
| | | case AttrEnum.DefyDefResis:
|
| | | case PropertyType.DefyDefResis:
|
| | | return PlayerDatas.Instance.extersion.IgnoreDefRateReduce;
|
| | | case AttrEnum.DefChance:
|
| | | case PropertyType.DefChance:
|
| | | return PlayerDatas.Instance.extersion.DamChanceDef;
|
| | | case AttrEnum.BloodHurt:
|
| | | case PropertyType.BloodHurt:
|
| | | return PlayerDatas.Instance.extersion.BleedDamage;
|
| | | case AttrEnum.AktReplyBlood:
|
| | | case PropertyType.AktReplyBlood:
|
| | | return PlayerDatas.Instance.extersion.BattleValEx2;
|
| | | case AttrEnum.Stun:
|
| | | case PropertyType.Stun:
|
| | | return PlayerDatas.Instance.extersion.FaintRate;
|
| | | case AttrEnum.CtrlResis:
|
| | | case PropertyType.CtrlResis:
|
| | | return PlayerDatas.Instance.extersion.FaintDefRate;
|
| | | case AttrEnum.OutHurt:
|
| | | case PropertyType.OutHurt:
|
| | | return PlayerDatas.Instance.extersion.FinalHurt;
|
| | | case AttrEnum.ReduceBearHurt:
|
| | | case PropertyType.ReduceBearHurt:
|
| | | return PlayerDatas.Instance.extersion.FinalHurtReduce;
|
| | | case AttrEnum.PVPAddHurt:
|
| | | case PropertyType.PVPAddHurt:
|
| | | return PlayerDatas.Instance.extersion.DamagePerPVP;
|
| | | case AttrEnum.PVPReduceHurt:
|
| | | case PropertyType.PVPReduceHurt:
|
| | | return PlayerDatas.Instance.extersion.DamagePerPVPReduce;
|
| | | case AttrEnum.DleHitChance:
|
| | | case PropertyType.DleHitChance:
|
| | | return PlayerDatas.Instance.extersion.ComboDamPerRate;
|
| | | case AttrEnum.DleHurt:
|
| | | case PropertyType.DleHurt:
|
| | | return PlayerDatas.Instance.extersion.ComboDamPer;
|
| | | case AttrEnum.SkillHurtPrecent:
|
| | | case PropertyType.SkillHurtPrecent:
|
| | | return PlayerDatas.Instance.extersion.skillAtkRateReduce;
|
| | | case AttrEnum.NpcHurtAddPer:
|
| | | case PropertyType.NpcHurtAddPer:
|
| | | return PlayerDatas.Instance.extersion.NpcHurtAddPer;
|
| | | case PropertyType.Luck:
|
| | | return PlayerDatas.Instance.extersion.luckValue;
|
| | | case PropertyType.Mater:
|
| | | return PlayerDatas.Instance.baseData.mater;
|
| | | case PropertyType.Wood:
|
| | | return PlayerDatas.Instance.baseData.wood;
|
| | | case PropertyType.Water:
|
| | | return PlayerDatas.Instance.baseData.water;
|
| | | case PropertyType.Fire:
|
| | | return PlayerDatas.Instance.baseData.fire;
|
| | | case PropertyType.Earth:
|
| | | return PlayerDatas.Instance.baseData.earth;
|
| | | }
|
| | | return 0;
|
| | | }
|