Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPromoteDetailShow", _m_GetPromoteDetailShow); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "allStoneLv", _g_get_allStoneLv); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "wingLv2GenerDict", _g_get_wingLv2GenerDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "roleStrongerDic", _g_get_roleStrongerDic); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "fightPowerPercents", _g_get_fightPowerPercents); |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_allStoneLv(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RolePromoteModel gen_to_be_invoked = (Snxxz.UI.RolePromoteModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.allStoneLv); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | |
| | | return count;
|
| | | }
|
| | |
|
| | | public int GetAllGemsLevel()
|
| | | {
|
| | | var level = 0;
|
| | | foreach (var key in m_EquipGems.Keys)
|
| | | {
|
| | | var equipGems = m_EquipGems[key];
|
| | | foreach (var equipGem in equipGems)
|
| | | {
|
| | | var id = equipGem.id;
|
| | | if (id == 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var config = ItemConfig.Get(id);
|
| | | level += config != null ? config.EffectValueB1 : 0;
|
| | | }
|
| | | }
|
| | | return level;
|
| | | }
|
| | |
|
| | | public int Compare(string lhs, string rhs)
|
| | | {
|
| | | var lhsItem = packModel.GetItemByGuid(lhs);
|
| | |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | |
|
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | |
|
| | | [SerializeField] Image funcImg;
|
| | | [SerializeField] Text targetFightPowerTxt;
|
| | | [SerializeField] Text selfFightPowerTxt;
|
| | |
| | | break;
|
| | | case FuncPowerType.Stone:
|
| | | targetValue = GetAllStoneLv(viewPlayerData.rolePlusData.GetAllEquipStone());
|
| | | selfValue = GetAllStoneLv(PlayerStoneData.Instance.GetAllStone());
|
| | | selfValue = equipGemModel.GetAllGemsLevel();
|
| | | break;
|
| | | case FuncPowerType.Suit:
|
| | | handled = true;
|
| | |
| | | {
|
| | | ParseConfig();
|
| | | playerPack.refreshItemCountEvent += RefreshItemCountAct;
|
| | | PlayerStoneData.OnRefreshStoneData += OnRefreshStoneData;
|
| | | MountModel.Event_MountHA301A += OnRefreshMountData;
|
| | | PetModel.Event_H0704Add += OnRefreshPetData;
|
| | | PetModel.Event_H0704Update += OnRefreshPetData;
|
| | |
| | |
|
| | | public void RefreshData()
|
| | | {
|
| | | GetAllStoneLv();
|
| | | GetWashCntDic();
|
| | | GetPetCntDic();
|
| | | GetMountCntDic();
|
| | |
| | | }
|
| | | _count = totalLv >= _tatalLv ? _runeHoleDatas.Count : 0;
|
| | | return totalLv >= _tatalLv;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 宝石
|
| | | private void OnRefreshStoneData()
|
| | | {
|
| | | GetAllStoneLv();
|
| | | }
|
| | | private int m_AllStoneLv = 0;
|
| | | public int allStoneLv
|
| | | {
|
| | | get { return m_AllStoneLv; }
|
| | | }
|
| | | private void GetAllStoneLv()
|
| | | {
|
| | | m_AllStoneLv = 0;
|
| | | var dict = PlayerStoneData.Instance.GetAllStone();
|
| | | foreach (uint[] array in dict.Values)
|
| | | {
|
| | | if (array == null || array.Length == 0) continue;
|
| | | for (int i = 0; i < array.Length; i++)
|
| | | {
|
| | | if (array[i] == 0) continue;
|
| | | ItemConfig _tagChinItemModel = ItemConfig.Get((int)array[i]);
|
| | | if (_tagChinItemModel == null) continue;
|
| | | m_AllStoneLv += _tagChinItemModel.EffectValueB1;
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|