| | |
| | | base.Done(vNetPack);
|
| | |
|
| | | var vNetData = vNetPack as HA317_tagMCAllEquipAttrActiveInfo;
|
| | | ModelCenter.Instance.GetModel<TreasureSoulModel>().UpdateTreasurePrivilege(vNetData);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HA353_tagMCMWPrivilegeDataInfo;
|
| | | ModelCenter.Instance.GetModel<TreasureSoulModel>().UpdateTreasurePrivilege(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | translator.DelayWrapLoader(typeof(PwdKeyboard), PwdKeyboardWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TreasureSoulModel), SnxxzUITreasureSoulModelWrap.__Register); |
| | | |
| | | |
| | | translator.DelayWrapLoader(typeof(Snxxz.UI.TreasureFindHostModel), SnxxzUITreasureFindHostModelWrap.__Register); |
| | | |
| | | |
| | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | demonJarSoulBuf = treasureSoulModel.GetTreasureSoulValue(2);
|
| | | demonJarSoulIncreaseDelta = 0;
|
| | |
|
| | | var bossId = GetLatestUnLockBoss();
|
| | |
| | |
|
| | | public void UpdateDemonJarSoul()
|
| | | {
|
| | | var demonJarSoul = treasureSoulModel.GetTreasureSoulValue(2);
|
| | | demonJarSoulIncreaseDelta = demonJarSoul - demonJarSoulBuf;
|
| | | demonJarSoulBuf = demonJarSoul;
|
| | | //demonJarSoulIncreaseDelta = demonJarSoul - demonJarSoulBuf;
|
| | | //demonJarSoulBuf = demonJarSoul;
|
| | | }
|
| | |
|
| | | private void OnPlayerLevelUp(PlayerDataType _type)
|
| | |
| | | void OnClickTreasureSoul()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<TreasureSoulWin>();
|
| | | }
|
| | | private void GodBeastBtn()
|
| | | {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public static void TreasureSoulGetReward(int id, int _beforeLevel, int _currentLevel)
|
| | | {
|
| | | activateType = ActivateFunc.TreasureSoul;
|
| | | treasureSoulId = id;
|
| | | titleIconKey = "XT_FBZH_11";
|
| | | propertyCompares.Clear();
|
| | | lastPropertyDict.Clear();
|
| | | currentPropertyDict.Clear();
|
| | | var model = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | TreasureSpecialData special;
|
| | | if (model.TryGetTreasureSoul(treasureSoulId, out special))
|
| | | {
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.StrengthenAdd:
|
| | | var configs = ItemPlusSumAttrConfig.GetValues();
|
| | | var before = -1;
|
| | | var present = 0;
|
| | | for (int i = 0; i < configs.Count; i++)
|
| | | {
|
| | | if (_beforeLevel >= configs[i].countNeed)
|
| | | {
|
| | | before = i;
|
| | | }
|
| | | if (_currentLevel >= configs[i].countNeed)
|
| | | {
|
| | | present = i;
|
| | | }
|
| | | }
|
| | | ItemPlusSumAttrConfig _beforeConfig = null;
|
| | | if (before >= 0 && before < configs.Count)
|
| | | {
|
| | | _beforeConfig = configs[before];
|
| | | }
|
| | | List<int> _beforeProperties = new List<int>();
|
| | | if (_beforeConfig != null)
|
| | | {
|
| | | _beforeProperties.AddRange(_beforeConfig.attType);
|
| | | for (int i = 0; i < _beforeConfig.attType.Length; i++)
|
| | | {
|
| | | lastPropertyDict.Add(_beforeConfig.attType[i], _beforeConfig.attValue[i]);
|
| | | }
|
| | | }
|
| | | var config = (present < 0 || present >= configs.Count) ? null : configs[present];
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | for (int i = 0; i < config.attType.Length; i++)
|
| | | {
|
| | | var _index = _beforeProperties.IndexOf(config.attType[i]);
|
| | | if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index])
|
| | | {
|
| | | propertyCompares.Add(new PropertyCompare()
|
| | | {
|
| | | key = config.attType[i],
|
| | | beforeValue = _index == -1 ? 0 : _beforeConfig.attValue[_index],
|
| | | currentValue = config.attValue[i]
|
| | | });
|
| | | }
|
| | |
|
| | | currentPropertyDict.Add(config.attType[i], config.attValue[i]);
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | | case TreasurePrivilege.MountAtk:
|
| | | case TreasurePrivilege.PetHp:
|
| | | case TreasurePrivilege.Sp:
|
| | | foreach (var _key in special.propertyDict.Keys)
|
| | | {
|
| | | var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress;
|
| | | var nowValue = special.propertyDict[_key] * _currentLevel / special.progress;
|
| | | lastPropertyDict.Add(_key, beforeValue);
|
| | | currentPropertyDict.Add(_key, nowValue);
|
| | | propertyCompares.Add(new PropertyCompare()
|
| | | {
|
| | | key = _key,
|
| | | beforeValue = beforeValue,
|
| | | currentValue = nowValue
|
| | | });
|
| | | }
|
| | | break;
|
| | | }
|
| | | fightPower = UIHelper.GetFightPower(currentPropertyDict) - UIHelper.GetFightPower(lastPropertyDict);
|
| | | if (!WindowCenter.Instance.IsOpen<RealmPropertyUpWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPropertyUpWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public static void JadeDynastySkillUnlock(int skillId)
|
| | | {
|
| | | activateType = ActivateFunc.JadeDynastySkill;
|
| | |
| | | Realm,
|
| | | GodWeapon,
|
| | | Stove, //炼丹炉升级
|
| | | TreasureSoul,//法宝魂领取属性
|
| | | JadeDynastySkill,
|
| | | }
|
| | |
|
| | |
| | | DisplayNewGotSkill();
|
| | | }
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.TreasureSoul:
|
| | | DisplayTreasureSoul();
|
| | | DisplayFightPower();
|
| | | DisplayProperty();
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.JadeDynastySkill:
|
| | | DisplayFightPower();
|
| | | DisplayNewGotSkill();
|
| | |
| | | m_Properties[i].gameObject.SetActive(true);
|
| | | switch (ActivateShow.activateType)
|
| | | {
|
| | | case ActivateShow.ActivateFunc.TreasureSoul:
|
| | | case ActivateShow.ActivateFunc.Realm:
|
| | | m_Properties[i].Display(ActivateShow.propertyCompares[i].key
|
| | | , ActivateShow.propertyCompares[i].beforeValue, ActivateShow.propertyCompares[i].currentValue);
|
| | |
| | | {
|
| | | var result = 0f;
|
| | | var config = ItemConfig.Get(id);
|
| | | var _treasureSoul = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | var _upper = (float)_treasureSoul.GetTreasureSoulValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
|
| | | if (config.Type == RuneModel.RUNE_CREAMTYPE)
|
| | | {
|
| | | return config.EffectValueA1 + config.EffectValueA1 * _upper;
|
| | | return config.EffectValueA1 + config.EffectValueA1;
|
| | | }
|
| | | for (int i = 1; i <= level; i++)
|
| | | {
|
| | | if (i == 1 && !fromCompose)
|
| | | {
|
| | | result += m_RuneBaseResolveSplinters[config.ItemColor] +
|
| | | m_RuneBaseResolveSplinters[config.ItemColor] * _upper;
|
| | | m_RuneBaseResolveSplinters[config.ItemColor];
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public float GetRuneResolveGetSouls(int id)
|
| | | {
|
| | | ItemConfig config = ItemConfig.Get(id);
|
| | | var _treasureSoul = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | var _upper = (float)_treasureSoul.GetTreasureSoulValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
|
| | | if (config.Type == RuneModel.RUNE_CREAMTYPE)
|
| | | {
|
| | | return config.EffectValueA1 * _upper;
|
| | | return config.EffectValueA1;
|
| | | }
|
| | | else
|
| | | {
|
| | | return m_RuneBaseResolveSplinters[config.ItemColor] * _upper;
|
| | | return m_RuneBaseResolveSplinters[config.ItemColor];
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | RuneModel model { get { return ModelCenter.Instance.GetModel<RuneModel>(); } }
|
| | | RuneResolveModel runeResolveModel { get { return ModelCenter.Instance.GetModel<RuneResolveModel>(); } }
|
| | | VirtualPackModel virtualPackModel { get { return ModelCenter.Instance.GetModel<VirtualPackModel>(); } }
|
| | |
|
| | | TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
|
| | |
|
| | | RuneComposeModel runeComposeModel { get { return ModelCenter.Instance.GetModel<RuneComposeModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | |
| | |
|
| | | DisplayRuneItems();
|
| | |
|
| | | m_ContainerRuneSoul.gameObject.SetActive(treasureSoulModel.IsGetTreasureSoul((int)TreasurePrivilege.RuneBreakExpAdd));
|
| | | m_ContainerRuneSoul.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
|
| | |
|
| | | public override void Display(int _treasureId, bool _tween = false)
|
| | | {
|
| | | base.Display(_treasureId, _tween);
|
| | |
| | |
|
| | | private void OnSignRefresh()
|
| | | {
|
| | | if(treasure.id== treasureSoulModel.signAddTreasure)
|
| | | var _property = model.GetSignInPropertys().First();
|
| | | var _propertyCfg = PlayerPropertyConfig.Get(_property.Key);
|
| | | m_SignPropertyEffect.text = Language.Get("FairyTreasure_5",
|
| | | _property.Value, _propertyCfg.Name);
|
| | | m_SignInTotalDays.text = Language.Get("FairyTreasure_6", signInModel.totalSignInCount);
|
| | | if (treasure.state != TreasureState.Collected)
|
| | | {
|
| | | var _property = treasureSoulModel.signAddProperty.First();
|
| | | var _propertyCfg = PlayerPropertyConfig.Get(_property.Key);
|
| | | m_SignPropertyEffect.text = Language.Get("FairyTreasure_5",
|
| | | _property.Value, _propertyCfg.Name);
|
| | | m_SignInTotalDays.text = Language.Get("FairyTreasure_6", signInModel.totalSignInCount);
|
| | | if (treasure.state != TreasureState.Collected)
|
| | | {
|
| | | m_ProerptyValue.text = Language.Get("FairyTreasure_7",
|
| | | _propertyCfg.Name, signInModel.totalSignInCount * _property.Value);
|
| | | m_SignInTip.text = Language.Get("SignInTreasureTip1");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ProerptyValue.text = Language.Get("FairyTreasure_8",
|
| | | _propertyCfg.Name, signInModel.totalSignInCount * _property.Value);
|
| | | m_SignInTip.text = Language.Get("SignInTreasureTip2");
|
| | | }
|
| | | m_ProerptyValue.text = Language.Get("FairyTreasure_7",
|
| | | _propertyCfg.Name, signInModel.totalSignInCount * _property.Value);
|
| | | m_SignInTip.text = Language.Get("SignInTreasureTip1");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ProerptyValue.text = Language.Get("FairyTreasure_8",
|
| | | _propertyCfg.Name, signInModel.totalSignInCount * _property.Value);
|
| | | m_SignInTip.text = Language.Get("SignInTreasureTip2");
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [XLua.LuaCallCSharp]
|
| | | public class TreasureModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, Treasure> treasures = new Dictionary<int, Treasure>();
|
| | | Dictionary<TreasureCategory, List<int>> treasureCategory = new Dictionary<TreasureCategory, List<int>>();
|
| | | Dictionary<int, int> treasureMapDict = new Dictionary<int, int>();
|
| | | Dictionary<int, TreasureDungeon> treasureDungeons = new Dictionary<int, TreasureDungeon>();
|
| | | Dictionary<int, List<int>> treasureTasks = new Dictionary<int, List<int>>();
|
| | | Dictionary<TreasureCategory, int> treasureUnlockShowDict = new Dictionary<TreasureCategory, int>();
|
| | | Dictionary<int, int> treasureTaskCompletedCounts = new Dictionary<int, int>();
|
| | | Dictionary<int, int> treasureSignInPropertys = new Dictionary<int, int>();
|
| | | List<int> eightFurnacesAchievements = new List<int>();
|
| | | List<int> treasureUnOpens = new List<int>();
|
| | |
|
| | | public const int TREASURE_DATAMAPID = 41110;
|
| | | public const int TREASURE_MAPID = 41110;
|
| | | public const int TREASURE_GUIDE_ID = 102;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, Treasure> treasures = new Dictionary<int, Treasure>();
|
| | | Dictionary<TreasureCategory, List<int>> treasureCategory = new Dictionary<TreasureCategory, List<int>>();
|
| | | Dictionary<int, int> treasureMapDict = new Dictionary<int, int>();
|
| | | Dictionary<int, TreasureDungeon> treasureDungeons = new Dictionary<int, TreasureDungeon>();
|
| | | Dictionary<int, List<int>> treasureTasks = new Dictionary<int, List<int>>();
|
| | | Dictionary<TreasureCategory, int> treasureUnlockShowDict = new Dictionary<TreasureCategory, int>();
|
| | | Dictionary<int, int> treasureTaskCompletedCounts = new Dictionary<int, int>();
|
| | | List<int> eightFurnacesAchievements = new List<int>();
|
| | | List<int> treasureUnOpens = new List<int>();
|
| | |
|
| | | public Dictionary<int, int> fairyTreasureGetDict { get; private set; }
|
| | |
|
| | |
| | | }
|
| | | tasks.Add(config.TaskID);
|
| | | }
|
| | |
|
| | | funcConfig = FuncConfigConfig.Get("MWSignDayAttr");
|
| | | var jsonData = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
|
| | | foreach (var _key in jsonData.Keys)
|
| | | {
|
| | | treasureSignInPropertys.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
|
| | | }
|
| | | }
|
| | |
|
| | | public void TryOpenRegulusPopWindow()
|
| | |
| | | public List<int> GetFurnacesAchievements()
|
| | | {
|
| | | return eightFurnacesAchievements;
|
| | | }
|
| | |
|
| | | public Dictionary<int, int> GetSignInPropertys()
|
| | | {
|
| | | return treasureSignInPropertys;
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataType refreshType)
|
| | |
| | |
|
| | | public int GetExtensionPower(int _treasureId)
|
| | | {
|
| | | var treasureSoulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | if (_treasureId == treasureSoulModel.signAddTreasure)
|
| | | if (_treasureId == 304)
|
| | | {
|
| | | var signInDays = ModelCenter.Instance.GetModel<SignInModel>().totalSignInCount;
|
| | | if (signInDays == 0)
|
| | |
| | | return 0;
|
| | | }
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | foreach (var key in treasureSoulModel.signAddProperty.Keys)
|
| | | foreach (var key in treasureSignInPropertys.Keys)
|
| | | {
|
| | | dict.Add(key, treasureSoulModel.signAddProperty[key] * signInDays);
|
| | | dict.Add(key, treasureSignInPropertys[key] * signInDays);
|
| | | }
|
| | | return UIHelper.GetFightPower(dict);
|
| | | }
|
| | |
| | | }
|
| | | break;
|
| | | case 304://签到相关配置移到功能配置表
|
| | | var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | var _propertyDict = soulModel.signAddProperty;
|
| | | var _propertyDict = model.GetSignInPropertys();
|
| | | if (_propertyDict != null)
|
| | | {
|
| | | var _keyValue = _propertyDict.First();
|
| | |
| | | RegisterModel<MultipleRealmPointModel>();
|
| | | RegisterModel<DogzDungeonModel>();
|
| | | RegisterModel<DogzModel>();
|
| | | RegisterModel<TreasureSoulModel>();
|
| | | RegisterModel<FairyGrabBossModel>();
|
| | | RegisterModel<GodBeastModel>();
|
| | | RegisterModel<PrayForDurgModel>();
|
| | |
| | | SetJumpLogic<RolePanel>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.TreasureSoul:
|
| | | SetJumpLogic<TreasureSoulWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.TreasureCollectSoul:
|
| | | SetJumpLogic<TreasureBaseWin>(0);
|
| | |
| | | case JumpUIType.FaBaoSoul_Wings:
|
| | | case JumpUIType.FaBaoSoul_Suit:
|
| | | case JumpUIType.FaBaoSoul_Wash:
|
| | | var soulId = 0;
|
| | | if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
|
| | | {
|
| | | ModelCenter.Instance.GetModel<TreasureSoulModel>().gotoSoul = soulId;
|
| | | }
|
| | | SetJumpLogic<TreasureSoulWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.XianBaguaIntr:
|
| | | case JumpUIType.XyjJs:
|
| | |
| | | case JumpUIType.FaBaoSoul_Wings:
|
| | | case JumpUIType.FaBaoSoul_Suit:
|
| | | case JumpUIType.FaBaoSoul_Wash:
|
| | | var soulId = 0;
|
| | | if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
|
| | | {
|
| | | var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | if (!soulModel.IsOpenTreasureSoul(soulId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | case JumpUIType.TrialExchange:
|
| | | case JumpUIType.TrialExchange2:
|