| | |
| | | public Dictionary<int, string> godWeaponIcons { get; private set; }
|
| | | public Dictionary<int, Dictionary<int, int>> godWeaponSkillDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, List<GodWeaponCondition>> godWeaponConditions = new Dictionary<int, List<GodWeaponCondition>>();
|
| | | Dictionary<int, int> playerLevelConditions = new Dictionary<int, int>();
|
| | | public List<int> godWeaponSorts = new List<int>();
|
| | | Dictionary<int, AutoHammerCost> autoHammerCostDict = new Dictionary<int, AutoHammerCost>();
|
| | | Dictionary<int, List<int>> godWeaponStageDict = new Dictionary<int, List<int>>();
|
| | |
| | | level = condition[1],
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | json = LitJson.JsonMapper.ToObject(conditionConfig.Numerical3);
|
| | | foreach (var key in json.Keys)
|
| | | {
|
| | | var type = int.Parse(key);
|
| | | playerLevelConditions.Add(type, int.Parse(json[key].ToString()));
|
| | | }
|
| | |
|
| | | var sortConfig = Config.Instance.Get<FuncConfigConfig>("GodWeaponSort");
|
| | |
| | |
|
| | | public bool SatisfyUnlockCondition(int type)
|
| | | {
|
| | | if (!playerLevelConditions.ContainsKey(type)
|
| | | && !godWeaponConditions.ContainsKey(type))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | List<GodWeaponCondition> list;
|
| | | bool satisfyCondition = false;
|
| | | if (godWeaponConditions.TryGetValue(type, out list))
|
| | | {
|
| | | bool satisfy = true;
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var godWeaponInfo = GetGodWeaponInfo(list[i].type);
|
| | | if (godWeaponInfo == null || godWeaponInfo.level < list[i].level)
|
| | | {
|
| | | return false;
|
| | | satisfy = false;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (satisfy)
|
| | | {
|
| | | satisfyCondition = true;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | var playerLevelLimit = 0;
|
| | | if (TryGetPlayerLevelCondition(type, out playerLevelLimit))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= playerLevelLimit)
|
| | | {
|
| | | satisfyCondition = true;
|
| | | }
|
| | | }
|
| | | return satisfyCondition;
|
| | | }
|
| | |
|
| | | public int GetAutoHammerCount(int type)
|
| | |
| | |
|
| | | public bool ContainsCondition(int type)
|
| | | {
|
| | | return godWeaponConditions.ContainsKey(type);
|
| | | return godWeaponConditions.ContainsKey(type) || playerLevelConditions.ContainsKey(type);
|
| | | }
|
| | |
|
| | | public bool TryGetConditions(int type, out List<GodWeaponCondition> list)
|
| | |
| | | return godWeaponConditions.TryGetValue(type, out list);
|
| | | }
|
| | |
|
| | | public bool TryGetPlayerLevelCondition(int type,out int level)
|
| | | {
|
| | | return playerLevelConditions.TryGetValue(type, out level);
|
| | | }
|
| | |
|
| | | public int GetGodWeaponStage(int type)
|
| | | {
|
| | | var stage = 0;
|