Merge branch 'master' into Rune
| | |
| | | /// 是否是装备, 这里的装备指的是: 武器, 帽子, 衣服, 下装, 鞋子, 腰带
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public bool IsEquip(E_DropItemType itemType)
|
| | | public bool IsEquip(ItemType itemType)
|
| | | {
|
| | | return itemType >= E_DropItemType.Equip_Weapon && itemType <= E_DropItemType.Equip_Shoes;
|
| | | return itemType >= ItemType.Equip_Weapon && itemType <= ItemType.Equip_Shoes;
|
| | | }
|
| | |
|
| | | public void RequestWorldTick()
|
| | |
| | | return item;
|
| | | }
|
| | |
|
| | | public static bool IsWing(int itemId)
|
| | | {
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return config != null && (config.Type == 111 || config.Type == 39 || config.Type == 52);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
| | | [HideInInspector] |
| | | public CapsuleCollider capsuleCollider; |
| | | |
| | | public GameObject Effect; |
| | | |
| | | public void Save(BinaryWriter bw) |
| | | { |
| | | bw.Write(effectID); |
| | |
| | | transform.position = new Vector3(_x, _y, _z); |
| | | float _r = br.ReadSingle(); |
| | | capsuleCollider.radius = _r; |
| | | if (EffectConfig.Has(effectID)) |
| | | { |
| | | var _prefab = InstanceResourcesLoader.LoadEffect(effectID); |
| | | Effect = Instantiate(_prefab); |
| | | Effect.transform.SetParent(transform); |
| | | Effect.transform.localPosition = Vector3.zero; |
| | | Effect.transform.localScale = Vector3.one; |
| | | Effect.transform.rotation = Quaternion.identity; |
| | | } |
| | | } |
| | | |
| | | public void Export(BinaryWriter bw) |
| | |
| | | EditorGUILayout.BeginHorizontal(GUILayout.Height(22)); |
| | | EditorGUILayout.LabelField("[" + (i + 1) + "]", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(25)); |
| | | EditorGUILayout.LabelField("特效", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(25)); |
| | | pointList[i].effectID = EditorGUILayout.IntField(pointList[i].effectID, guiSkin.textField, GUILayout.Height(20)); |
| | | var _effectID = pointList[i].effectID; |
| | | _effectID = EditorGUILayout.IntField(_effectID, guiSkin.textField, GUILayout.Height(20)); |
| | | if (_effectID != pointList[i].effectID) |
| | | { |
| | | if (EffectConfig.Has(_effectID)) |
| | | { |
| | | var _prefab = InstanceResourcesLoader.LoadEffect(_effectID); |
| | | if (_prefab) |
| | | { |
| | | if (pointList[i].Effect) |
| | | { |
| | | DestroyImmediate(pointList[i].Effect); |
| | | pointList[i].Effect = null; |
| | | } |
| | | pointList[i].Effect = Instantiate(_prefab); |
| | | pointList[i].Effect.transform.SetParent(pointList[i].transform); |
| | | pointList[i].Effect.transform.localPosition = Vector3.zero; |
| | | pointList[i].Effect.transform.localScale = Vector3.one; |
| | | pointList[i].Effect.transform.rotation = Quaternion.identity; |
| | | pointList[i].effectID = _effectID; |
| | | } |
| | | } |
| | | } |
| | | EditorGUILayout.EndHorizontal(); |
| | | |
| | | if (i - 1 >= 0) |
| | | { |
| | | EditorGUILayout.BeginHorizontal(GUILayout.Height(22)); |
| | | EditorGUILayout.LabelField("到上一个节点的动作", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(120)); |
| | | pointList[i].stateNameFront = EditorGUILayout.TextField(pointList[i].stateNameFront, guiSkin.textField, GUILayout.Height(20)); |
| | | pointList[i].stateNameBack = EditorGUILayout.TextField(pointList[i].stateNameBack, guiSkin.textField, GUILayout.Height(20)); |
| | | EditorGUILayout.LabelField("时间", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(25)); |
| | | pointList[i].flyTimeFront = EditorGUILayout.FloatField(pointList[i].flyTimeFront, guiSkin.textField, GUILayout.Height(20)); |
| | | pointList[i].flyTimeBack = EditorGUILayout.FloatField(pointList[i].flyTimeBack, guiSkin.textField, GUILayout.Height(20)); |
| | | EditorGUILayout.EndHorizontal(); |
| | | } |
| | | |
| | |
| | | { |
| | | EditorGUILayout.BeginHorizontal(GUILayout.Height(22)); |
| | | EditorGUILayout.LabelField("到下一个节点的动作", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(120)); |
| | | pointList[i].stateNameBack = EditorGUILayout.TextField(pointList[i].stateNameBack, guiSkin.textField, GUILayout.Height(20)); |
| | | pointList[i].stateNameFront = EditorGUILayout.TextField(pointList[i].stateNameFront, guiSkin.textField, GUILayout.Height(20)); |
| | | EditorGUILayout.LabelField("时间", guiSkin.customStyles[0], GUILayout.Height(20), GUILayout.Width(25)); |
| | | pointList[i].flyTimeBack = EditorGUILayout.FloatField(pointList[i].flyTimeBack, guiSkin.textField, GUILayout.Height(20)); |
| | | pointList[i].flyTimeFront = EditorGUILayout.FloatField(pointList[i].flyTimeFront, guiSkin.textField, GUILayout.Height(20)); |
| | | EditorGUILayout.EndHorizontal(); |
| | | } |
| | | |
| | |
| | |
|
| | | // 背包已满,且不是铜钱不拾取
|
| | | if (playerPack.GetEmptyGridCount(PackType.Item) == 0
|
| | | && _itemModel.Type != (int)E_DropItemType.DropCopper
|
| | | && _itemModel.Type != (int)E_DropItemType.Copper)
|
| | | && _itemModel.Type != (int)ItemType.DropCopper
|
| | | && _itemModel.Type != (int)ItemType.Copper)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | // 对装备是否拾取的判断
|
| | | if (PlayerDatas.Instance.IsEquip((E_DropItemType)_itemModel.Type))
|
| | | if (PlayerDatas.Instance.IsEquip((ItemType)_itemModel.Type))
|
| | | {
|
| | | //Debug.LogFormat("检测装备: {0} 是否可以拾取, 颜色: {1}", _itemModel.ID, (E_ItemColor)_itemModel.ItemColor);
|
| | | // 是否配置了白色,蓝色装备不捡
|
| | |
| | | }
|
| | | // 项链或者仙器
|
| | | else if (
|
| | | ((E_DropItemType)_itemModel.Type == E_DropItemType.Equip_FairyCan1
|
| | | || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_FairyCan2
|
| | | || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_Jade
|
| | | || (E_DropItemType)_itemModel.Type == E_DropItemType.Equip_Neck)
|
| | | ((ItemType)_itemModel.Type == ItemType.Equip_FairyCan1
|
| | | || (ItemType)_itemModel.Type == ItemType.Equip_FairyCan2
|
| | | || (ItemType)_itemModel.Type == ItemType.Equip_Jade
|
| | | || (ItemType)_itemModel.Type == ItemType.Equip_Neck)
|
| | | && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.necklaces))
|
| | | {
|
| | | //Debug.Log(" |-- 配置了项链或者仙器不拾取, 这个是项链或者仙器, 不拾取");
|
| | | return true;
|
| | | }
|
| | | // 宝石
|
| | | else if ((E_DropItemType)_itemModel.Type == E_DropItemType.Gemstone
|
| | | else if ((ItemType)_itemModel.Type == ItemType.Gemstone
|
| | | && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.gem))
|
| | | {
|
| | | //Debug.Log(" |-- 配置了项链或者仙器不拾取, 这个是项链或者仙器, 不拾取");
|
| | | return true;
|
| | | }
|
| | | // 药品
|
| | | else if ((E_DropItemType)_itemModel.Type == E_DropItemType.Drugs
|
| | | else if ((ItemType)_itemModel.Type == ItemType.Drugs
|
| | | && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.drug))
|
| | | {
|
| | | return true;
|
| | | }
|
| | | // 金币
|
| | | else if ((E_DropItemType)_itemModel.Type == E_DropItemType.DropCopper
|
| | | else if ((ItemType)_itemModel.Type == ItemType.DropCopper
|
| | | && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.coins))
|
| | | {
|
| | | return true;
|
| | |
| | | // 其他
|
| | | else
|
| | | {
|
| | | if ((E_DropItemType)_itemModel.Type != E_DropItemType.DropCopper
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Drugs
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Gemstone
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_Neck
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_FairyCan1
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_Jade
|
| | | && (E_DropItemType)_itemModel.Type != E_DropItemType.Equip_FairyCan2
|
| | | && !PlayerDatas.Instance.IsEquip((E_DropItemType)_itemModel.Type)
|
| | | if ((ItemType)_itemModel.Type != ItemType.DropCopper
|
| | | && (ItemType)_itemModel.Type != ItemType.Drugs
|
| | | && (ItemType)_itemModel.Type != ItemType.Gemstone
|
| | | && (ItemType)_itemModel.Type != ItemType.Equip_Neck
|
| | | && (ItemType)_itemModel.Type != ItemType.Equip_FairyCan1
|
| | | && (ItemType)_itemModel.Type != ItemType.Equip_Jade
|
| | | && (ItemType)_itemModel.Type != ItemType.Equip_FairyCan2
|
| | | && !PlayerDatas.Instance.IsEquip((ItemType)_itemModel.Type)
|
| | | // 以上类型都不是且开启了其他拾取的时候
|
| | | && HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.other))
|
| | | {
|
| | |
| | | m_Step = 2; |
| | | _hero.OnHorse(0); |
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false); |
| | | _hero.Play(GAStaticDefine.State_Fly); |
| | | if (isPositive) |
| | | { |
| | | _hero.Play(Animator.StringToHash(m_Data.transferPoints[targetPoint - 1].stateNameFront)); |
| | | } |
| | | else |
| | | { |
| | | _hero.Play(Animator.StringToHash(m_Data.transferPoints[targetPoint + 1].stateNameBack)); |
| | | } |
| | | _hero.Idle(); |
| | | CameraController.Instance.LookAtTarget = _hero.Root.GetChildTransformDeeply("Bip001"); |
| | | } |
| | |
| | | case 2:// 执行坐标改变 |
| | | _p = m_Data.transferPoints[targetPoint]; |
| | | _hero.destForward = _hero.Forward = MathUtility.ForwardXZ(_p.position, _hero.Pos); |
| | | m_InCreaseTime += .5f * Time.deltaTime; |
| | | if (isPositive) |
| | | { |
| | | m_InCreaseTime += (Time.deltaTime / m_Data.transferPoints[targetPoint - 1].flyTimeFront); |
| | | } |
| | | else |
| | | { |
| | | m_InCreaseTime += (Time.deltaTime / m_Data.transferPoints[targetPoint + 1].flyTimeBack); |
| | | } |
| | | float _y = 0; |
| | | if (m_StartPos.y > _p.position.y) |
| | | { |
| | |
| | | { |
| | | int _itemId = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | bool gen_ret = ItemConfig.IsWing( _itemId ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | { |
| | | E_DropItemType _itemType;translator.Get(L, 2, out _itemType); |
| | | ItemType _itemType;translator.Get(L, 2, out _itemType); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsEquip( _itemType ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | |
| | | DebugEx.Log("GetMakerResult" + answer.Result);
|
| | | switch ((MakeType)answer.MakeType)
|
| | | {
|
| | | case MakeType.Def_mitRefine:
|
| | | case MakeType.DrugRefine:
|
| | | if (answer.Result == 1)
|
| | | {
|
| | | if (makerItemID != 0)
|
| | |
| | |
|
| | | private void OnGetRecycleResult(MakeType type, int result)
|
| | | {
|
| | | if (type != MakeType.Def_DanRecycle || result != 1) return;
|
| | | if (type != MakeType.DrugRecycle || result != 1) return;
|
| | |
|
| | | uieffect.Play();
|
| | | }
|
| | |
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | if (answer.MakeType != (int)MakeType.ItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | |
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | if (answer.MakeType != (int)MakeType.ItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | |
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | if (answer.MakeType != (int)MakeType.ItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | |
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | if (answer.MakeType != (int)MakeType.ItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | |
| | | {
|
| | | case SelectItemType.unfixed:
|
| | | matCell.SetDisplay(compoundModel, NeedMatType.unfixedItem, false, "", 0, itemIndex);
|
| | | IsComposeBind = ChangeFixedMatUI();
|
| | | IsComposeBind = false;
|
| | | break;
|
| | | case SelectItemType.addons:
|
| | | matCell.SetDisplay(compoundModel, NeedMatType.addItem, false, "", 0, itemIndex);
|
| | |
| | | case NeedMatType.unfixedItem:
|
| | | matCell.SetDisplay(compoundModel, matType, false,
|
| | | UIHelper.ReplaceNewLine(Language.Get("ComposeWin_PutInText_1")));
|
| | | IsComposeBind = ChangeFixedMatUI();
|
| | | IsComposeBind = false;
|
| | | break;
|
| | | case NeedMatType.addItem:
|
| | | matCell.SetDisplay(compoundModel, matType, false,
|
| | |
| | | UpdateComposeMat();
|
| | |
|
| | | composeItemSelectObj.SetActive(compoundModel.secondType < 4);
|
| | | }
|
| | |
|
| | | private bool ChangeFixedMatUI()
|
| | | {
|
| | | if (compoundModel == null) return false;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePack singlePack = playerPack.GetSinglePack(packType);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | bool isBind = false;
|
| | | Dictionary<int,ItemModel> unfixedMatDict = selectModel.GetHaveUnfixedSelectItem();
|
| | | //foreach(var model in unfixedMatDict.Values)
|
| | | //{
|
| | | // if(model.isBind == 1)
|
| | | // {
|
| | | // isBind = true;
|
| | | // break;
|
| | | // }
|
| | | //}
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | int[] fixedCounts = compoundModel.itemCount;
|
| | | int[] fixedDisplays = compoundModel.itemDisplay;
|
| | | for (int i = 0; i < fixedDisplays.Length; i++)
|
| | | {
|
| | | var fixedDisplay = fixedDisplays[i];
|
| | | if (fixedDisplay != 0)
|
| | | {
|
| | | var matCell = fixedAndUnfixeds[fixedDisplay - 1];
|
| | | int fixedId = fixedIds[i];
|
| | | var bindIcon = matCell.itemCell.auctionIcon;
|
| | | bindIcon.gameObject.SetActive(false);
|
| | | //if (isBind)
|
| | | //{
|
| | | // var list= singlePack.GetItemsById(fixedId);
|
| | | // if (list != null)
|
| | | // {
|
| | | // for (int j = 0; j < list.Count; j++)
|
| | | // {
|
| | | // if (list[j].isBind == 1)
|
| | | // {
|
| | | // bindIcon.gameObject.SetActive(true);
|
| | | // break;
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | return isBind;
|
| | | }
|
| | |
|
| | | public int RefreshComposeSuccessRate(int initRate)
|
| | |
| | |
|
| | | private void OnComposeAnswer(HA814_tagMCMakeItemAnswer answer)
|
| | | {
|
| | | if (answer.MakeType != (int)MakeType.Def_mitItemCompound)
|
| | | if (answer.MakeType != (int)MakeType.ItemCompound)
|
| | | return;
|
| | |
|
| | | if (answer.Result == 1)
|
| | |
| | | public void Display(ItemModel model)
|
| | | {
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if(model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | |
| | | itemBaisc.stateIcon.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | itemBaisc.button.RemoveAllListeners();
|
| | | itemBaisc.button.AddListener(()=>
|
| | | {
|
| | |
| | | nameTex.text = model.config.ItemName;
|
| | | nameTex.color = UIHelper.GetUIColor(model.config.ItemColor,true);
|
| | | itemBaisc.Init(model);
|
| | | itemBaisc.auctionIcon.gameObject.SetActive(false);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseData((int)ItemUseDataKey.dogzEquipPlus) != null)
|
| | | {
|
| | |
| | | {
|
| | | var config_x = ItemConfig.Get(x.id);
|
| | | var config_y = ItemConfig.Get(y.id);
|
| | | bool equip_x = config_x.Type >= 101 && config_x.Type <= 109;
|
| | | bool equip_y = config_y.Type >= 101 && config_y.Type <= 109;
|
| | | bool equip_x = ItemLogicUtility.Instance.IsEquip(x.id);
|
| | | bool equip_y = ItemLogicUtility.Instance.IsEquip(y.id);
|
| | | if (equip_x.CompareTo(equip_y) != 0)
|
| | | {
|
| | | return equip_x.CompareTo(equip_y);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | bool type_108109_x = config_x.Type >= 108;
|
| | | bool type_108109_y = config_y.Type >= 108;
|
| | | if (type_108109_x || type_108109_y)
|
| | | {
|
| | | if (config_x.Type.CompareTo(config_y.Type) != 0)
|
| | | {
|
| | | return -config_x.Type.CompareTo(config_y.Type);
|
| | | }
|
| | | }
|
| | | if (config_x.ItemColor.CompareTo(config_y.ItemColor) != 0)
|
| | | {
|
| | | return -config_x.ItemColor.CompareTo(config_y.ItemColor);
|
| | |
| | | |
| | | void OnGetUpgradeStarResult(H0721_tagMakeItemAnswer info) |
| | | { |
| | | if (info.MakeType == (byte)MakeType.Def_mitEquipStarUpgrade) |
| | | if (info.MakeType == (byte)MakeType.EquipStarUpgrade) |
| | | { |
| | | var equipPosition = new Int2(selectedLevel.value, selectedPlace.value); |
| | | AutoAddMaterials(equipPosition); |
| | |
| | | [SerializeField] Transform m_ContainerPoivt;
|
| | | [SerializeField] Transform m_KillRewardExplain;
|
| | | [SerializeField] Text m_Rank;
|
| | | [SerializeField] RectTransform m_FirstRankRewardTip;
|
| | | [SerializeField] RectTransform m_FirstRankRewardTip;
|
| | | [SerializeField] Transform m_DoubleReward;
|
| | | [SerializeField] Transform m_DoubleChallenge;
|
| | | [SerializeField] ScrollRect m_RewardsScroll;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if ((config1.Type == 108 || config1.Type == 109) && (config2.Type != 108 && config2.Type != 109))
|
| | | if (config1.ItemColor != config2.ItemColor)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | else if ((config1.Type != 108 && config1.Type == 109) && (config2.Type == 108 || config2.Type == 109))
|
| | | {
|
| | | return 1;
|
| | | return config2.ItemColor.CompareTo(config1.ItemColor);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (config1.ItemColor != config2.ItemColor)
|
| | | {
|
| | | return config2.ItemColor.CompareTo(config1.ItemColor);
|
| | | }
|
| | | else if (config1.StarLevel != config2.StarLevel)
|
| | | {
|
| | | return config2.StarLevel.CompareTo(config1.StarLevel);
|
| | | }
|
| | | else
|
| | | {
|
| | | return config2.LV.CompareTo(config1.LV);
|
| | | }
|
| | | return config2.LV.CompareTo(config1.LV);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer package)
|
| | | {
|
| | | if (package.MakeType == (byte)MakeType.Def_mitGatherSoulCompound)
|
| | | if (package.MakeType == (byte)MakeType.GatherSoulCompound)
|
| | | {
|
| | | if (model.selectItemId != 0)
|
| | | {
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer package)
|
| | | {
|
| | | if (package.MakeType == (int)MakeType.Def_mitGatherSoulDecompose)
|
| | | if (package.MakeType == (int)MakeType.GatherSoulDecompose)
|
| | | {
|
| | | if (requireResolveEffect)
|
| | | {
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer package)
|
| | | {
|
| | | if (package.MakeType == (int)MakeType.Def_mitGatherSoulDecompose)
|
| | | if (package.MakeType == (int)MakeType.GatherSoulDecompose)
|
| | | {
|
| | | EffectMgr.Instance.PlayUIEffect(3080, 3100, transform, false);
|
| | | }
|
| | |
| | | case ItemType.VipTools: |
| | | WindowCenter.Instance.Open<VipOverdueWin>(); |
| | | break; |
| | | case ItemType.SpiritAnimal: |
| | | case ItemType.Guard_1: |
| | | WindowCenter.Instance.Open<GuardOverdueWin>(); |
| | | break; |
| | | } |
| | |
| | | m_ItemName.gameObject.SetActive(false); |
| | | } |
| | | break; |
| | | case ItemType.SpiritAnimal: |
| | | case ItemType.Guard_1: |
| | | m_ItemName.text = Language.Get("ItemOverdue107"); |
| | | break; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | |
| | | var itemModels = singlePack.GetItemsByType((int)ItemType.Wings); |
| | | var itemModels = singlePack.GetItemsByType((int)ItemType.Equip_Wing); |
| | | if (itemModels != null) |
| | | { |
| | | for (int i = 0; i < itemModels.Count; i++) |
| | |
| | | public int SetSellItemOrder(ItemModel startModel, ItemModel endModel) |
| | | { |
| | | bool startIsEquip = IsEquip(startModel.itemId); |
| | | bool endIsEquip = IsEquip(endModel .itemId); |
| | | bool endIsEquip = IsEquip(endModel.itemId); |
| | | if (startIsEquip.CompareTo(endIsEquip) != 0) return -startIsEquip.CompareTo(endIsEquip); |
| | | int order1 = startModel.config.Type; |
| | | int order2 = endModel.config.Type; |
| | |
| | | |
| | | public bool IsEquip(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return (config.Type >= 101 && config.Type <= 112) || (config.Type >= 128 && config.Type <= 137);
|
| | | return config.Type >= 101 && config.Type <= 112;
|
| | | } |
| | | |
| | | public bool IsWing(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return config.Type == 113 || config.Type == 39 || config.Type == 52;
|
| | | } |
| | | |
| | | public bool IsDogzEquip(int itemId)
|
| | | {
|
| | | if (ItemConfig.Has(itemId))
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | var config = ItemConfig.Get(itemId);
|
| | | return config.Type >= 119 && config.Type <= 124;
|
| | | } |
| | | |
| | | } |
| | |
| | |
|
| | | public int equipPlace {
|
| | | get {
|
| | | if ((config.Type >= 101 && config.Type <= 112) || (config.Type >= 128 && config.Type <= 137))
|
| | | if (ItemLogicUtility.Instance.IsEquip(itemId))
|
| | | {
|
| | | return EquipSet.ClientPlaceToServerPlace(new Int2(config.LV, config.EquipPlace));
|
| | | }
|
| | | else if (config.Type >= 113 && config.Type <= 117)
|
| | | {
|
| | | return EquipSet.ClientPlaceToServerPlace(new Int2(0, config.EquipPlace));
|
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 19, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class BagItemCell : CommonItemBaisc |
| | | { |
| | | Image m_AuctionIcon; |
| | | public Image auctionIcon { |
| | | get { |
| | | if (m_AuctionIcon == null) |
| | | { |
| | | m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction"); |
| | | } |
| | | return m_AuctionIcon; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据 bool值用来判断是否需要展示评分高低或者职业限制 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <param name="isCompare"></param> |
| | | public override void Init(ItemModel model, bool isCompare = false) |
| | | { |
| | | base.Init(model, isCompare); |
| | | auctionIcon.gameObject.SetActive(model.isAuction); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据(预览) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | public override void Init(ItemCellModel model) |
| | | { |
| | | base.Init(model); |
| | | auctionIcon.gameObject.SetActive(false); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3271fd9e5f6ed824dabe85aa9aa004e5 |
| | | timeCreated: 1552982226 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | #endregion
|
| | |
|
| | | private SinglePack packModel;
|
| | | private ItemModel _clickItemModel;
|
| | | private bool isDoubleClick = false;
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | private GridCell _lookEquipCell = null;
|
| | |
|
| | |
| | | {
|
| | | if (AchievementGoto.guideAchievementId != 0)
|
| | | {
|
| | | SuccessConfig successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | var successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | if (successConfig != null)
|
| | | {
|
| | | JumpUIType jump = (JumpUIType)successConfig.Jump;
|
| | | var jump = (JumpUIType)successConfig.Jump;
|
| | | switch (successConfig.Type)
|
| | | {
|
| | | case 94:
|
| | |
| | | {
|
| | | gridCell.itemCell.gameObject.SetActive(true);
|
| | | gridCell.itemCell.Init(itemModel, true);
|
| | | gridCell.itemCellBtn.OnOneParaClick = null;
|
| | | gridCell.itemCellBtn.m_OnDbClick = null;
|
| | | gridCell.itemCellBtn.onceClick = null;
|
| | | gridCell.itemCellBtn.doubleClick = null;
|
| | | if (KnapSackWin.titleType == KnapsackFuncTitle.depot)
|
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | |
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | |
| | | itemTipsModel.ShowUICtrl();
|
| | |
|
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | | ItemOperateUtility.Instance.PutInWareHouse(itemModel.guid);
|
| | | };
|
| | |
| | | }
|
| | | else if (KnapSackWin.titleType == KnapsackFuncTitle.bag)
|
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | gridCell.itemCellBtn.onceClick = (int info) =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.EventSystems;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | public class ButtonExtend : ButtonEx
|
| | | {
|
| | | public int intInfo = 0;
|
| | | //public bool OnListen { get; set; }
|
| | | public Action<int> OnOneParaClick;
|
| | |
|
| | | public Action<int> onceClick;
|
| | |
|
| | | public override void OnPointerClick(PointerEventData eventData)
|
| | | {
|
| | | base.OnPointerClick(eventData);
|
| | | if (OnCheckDbClick())
|
| | | if (IsDoubleClick())
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (OnOneParaClick != null) OnOneParaClick(intInfo);
|
| | | if (onceClick != null) onceClick(intInfo);
|
| | | }
|
| | |
|
| | | #region 双击
|
| | | private float dbInterval = 0.3f;
|
| | | private bool m_IsOnDb = false;
|
| | |
|
| | | private float doubleClickInterval = 0.3f;
|
| | | private bool m_IsOnDoubleClick = false;
|
| | | private bool m_FreezeDbClick = false;
|
| | | public Action m_OnDbClick;
|
| | | private bool OnCheckDbClick()
|
| | | public Action doubleClick;
|
| | |
|
| | | private bool IsDoubleClick()
|
| | | {
|
| | | if (m_OnDbClick == null)
|
| | | if (doubleClick == null)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | if (m_IsOnDb)
|
| | |
|
| | | if (m_IsOnDoubleClick)
|
| | | {
|
| | | if (!m_FreezeDbClick)
|
| | | {
|
| | | m_OnDbClick();
|
| | | m_IsOnDb = false;
|
| | | doubleClick();
|
| | | m_IsOnDoubleClick = false;
|
| | | m_FreezeDbClick = true;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FreezeDbClick = false;
|
| | | m_IsOnDb = true;
|
| | | m_IsOnDoubleClick = true;
|
| | | }
|
| | | TimeMgr.Instance.Register(this, OnDbCallback, dbInterval);
|
| | |
|
| | | TimeMgr.Instance.Register(this, OnDoubleClickCallback, doubleClickInterval);
|
| | | return true;
|
| | | }
|
| | |
|
| | | private void OnDbCallback(Component comp)
|
| | | private void OnDoubleClickCallback(Component comp)
|
| | | {
|
| | | if (!m_FreezeDbClick)
|
| | | {
|
| | | if (OnOneParaClick != null) OnOneParaClick(intInfo);
|
| | | if (onceClick != null) onceClick(intInfo);
|
| | | }
|
| | |
|
| | | m_FreezeDbClick = false;
|
| | | m_IsOnDb = false;
|
| | | m_IsOnDoubleClick = false;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public enum ItemCellformat
|
| | | {
|
| | | Format_84x84,
|
| | | Format_80x80,
|
| | | Format_70x70,
|
| | | Format_64x64,
|
| | | None,
|
| | | }
|
| | |
|
| | | public class CommonItemBaisc : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCellformat m_Format;
|
| | | public ItemCellformat format { get { return m_Format; } set { m_Format = value; } }
|
| | |
|
| | | Image m_BgIcon;
|
| | | public Image bgIcon {
|
| | | get {
|
| | | if (m_BgIcon == null)
|
| | | {
|
| | | m_BgIcon = this.transform.GetComponent<Image>("EquipBG");
|
| | | LoadPrefab();
|
| | | m_BgIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_BackGround");
|
| | | }
|
| | | return m_BgIcon;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_ItemIcon == null)
|
| | | {
|
| | | m_ItemIcon = this.transform.GetComponent<Image>("ItemIcon");
|
| | | LoadPrefab();
|
| | | m_ItemIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_Icon");
|
| | | }
|
| | | return m_ItemIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image m_AuctionIcon;
|
| | | public Image auctionIcon {
|
| | | get {
|
| | | if (m_AuctionIcon == null)
|
| | | {
|
| | | m_AuctionIcon = this.transform.GetComponent<Image>("Img_Auction");
|
| | | }
|
| | | return m_AuctionIcon;
|
| | | }
|
| | | }
|
| | |
|
| | | Image m_StateIcon;
|
| | | public Image stateIcon {
|
| | | get {
|
| | | if (m_StateIcon == null)
|
| | | {
|
| | | m_StateIcon = this.transform.GetComponent<Image>("stateIcon");
|
| | | LoadPrefab();
|
| | | m_StateIcon = this.transform.GetComponent<Image>("Container_ItemCell/Img_State");
|
| | | }
|
| | | return m_StateIcon;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_CountText == null)
|
| | | {
|
| | | m_CountText = this.transform.GetComponent<Text>("CountText");
|
| | | LoadPrefab();
|
| | | m_CountText = this.transform.GetComponent<Text>("Container_ItemCell/Txt_Count");
|
| | | }
|
| | | return m_CountText;
|
| | | }
|
| | |
| | | get {
|
| | | if (m_Button == null)
|
| | | {
|
| | | m_Button = this.GetComponent<Button>();
|
| | | LoadPrefab();
|
| | | m_Button = this.GetComponent<Button>("Container_ItemCell");
|
| | | }
|
| | | return m_Button;
|
| | | }
|
| | | }
|
| | |
|
| | | public int itemId { get; private set; }
|
| | | GameObject cellContainer;
|
| | | protected void LoadPrefab()
|
| | | {
|
| | | if (cellContainer == null)
|
| | | {
|
| | | switch (format)
|
| | | {
|
| | | case ItemCellformat.Format_64x64:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_64", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_70x70:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_70", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_80x80:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_80", "Container_ItemCell");
|
| | | break;
|
| | | case ItemCellformat.Format_84x84:
|
| | | cellContainer = UIUtility.CreateWidget("ItemCell_84", "Container_ItemCell");
|
| | | break;
|
| | | }
|
| | |
|
| | | if (cellContainer != null)
|
| | | {
|
| | | cellContainer.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | cellContainer.transform.SetAsFirstSibling();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int itemId { get; private set; }
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | |
|
| | |
| | | bgIcon.gameObject.SetActive(true);
|
| | | itemIcon.SetSprite(config.IconKey);
|
| | | bgIcon.SetItemBackGround(ItemLogicUtility.Instance.GetItemQuality(itemId, useDataDic));
|
| | |
|
| | | auctionIcon.gameObject.SetActive(isAuction);
|
| | |
|
| | | countText.gameObject.SetActive(count > 1);
|
| | | if (count > 1)
|
| | |
| | | gridCell.itemCell.gameObject.SetActive(true);
|
| | | //pdr ToDo
|
| | | gridCell.itemCell.Init(itemModel, true);
|
| | | gridCell.itemCellBtn.OnOneParaClick = null;
|
| | | gridCell.itemCellBtn.m_OnDbClick = null;
|
| | | gridCell.itemCellBtn.OnOneParaClick=(int info)=>
|
| | | gridCell.itemCellBtn.onceClick = null;
|
| | | gridCell.itemCellBtn.doubleClick = null;
|
| | | gridCell.itemCellBtn.onceClick=(int info)=>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Warehouse,itemModel.guid,false,true);
|
| | | itemTipsModel.SetDepotTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | gridCell.itemCellBtn.doubleClick = () =>
|
| | | {
|
| | | ItemOperateUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut, itemModel.guid);
|
| | | };
|
| | |
| | | {
|
| | | public class GridCell : MonoBehaviour
|
| | | {
|
| | | private ItemCell _itemCell;
|
| | | public ItemCell itemCell {
|
| | | private BagItemCell _itemCell;
|
| | | public BagItemCell itemCell {
|
| | | get
|
| | | {
|
| | | if(_itemCell == null)
|
| | | _itemCell = transform.Find("ItemCell").GetComponent<ItemCell>();
|
| | | _itemCell = transform.Find("ItemCell").GetComponent<BagItemCell>();
|
| | | return _itemCell;
|
| | | }
|
| | | }
|
| | |
| | | public Image cdImag {get { return _cdImage ?? (_cdImage = transform.Find("CDImag").GetComponent<Image>()); }}
|
| | |
|
| | | private ButtonExtend _itemCellBtn;
|
| | | public ButtonExtend itemCellBtn { get { return _itemCellBtn ?? (_itemCellBtn = transform.Find("ItemCell").GetComponent<ButtonExtend>()); } }
|
| | | public ButtonExtend itemCellBtn { get { return _itemCellBtn ?? (_itemCellBtn = transform.Find("ItemCell/Container_ItemCell").GetComponent<ButtonExtend>()); } }
|
| | |
|
| | | private Button _lockBtn;
|
| | | public Button lockBtn { get { return _lockBtn ?? (_lockBtn = transform.Find("GridLock").GetComponent<Button>()); } }
|
| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private ItemModel itemModel = null;
|
| | |
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
|
| | | public void SetModel(ItemModel itemModel)
|
| | | {
|
| | |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class ItemCell : CommonItemBaisc |
| | | { |
| | | private Button m_Reducebtn; |
| | |
| | | get { |
| | | if (m_Reducebtn == null) |
| | | { |
| | | m_Reducebtn = this.transform.GetComponent<Button>("Reducebtn"); |
| | | LoadPrefab(); |
| | | m_Reducebtn = this.transform.GetComponent<Button>("Container_ItemCell/Btn_Reduce"); |
| | | } |
| | | return m_Reducebtn; |
| | | } |
| | |
| | |
|
| | | private void OneKeySellSuccess(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if (obj.MakeType != (byte)MakeType.Def_mitKeySell)
|
| | | if (obj.MakeType != (byte)MakeType.OneKeySell)
|
| | | return;
|
| | |
|
| | | if(obj.Result == 1)
|
| | |
| | | if (int.TryParse(presentHrefInfo.mSplits["showitem"], out _id))
|
| | | {
|
| | | ItemConfig cfg = ItemConfig.Get(_id);
|
| | | if (cfg != null && cfg.Type == 111)
|
| | | if (cfg != null && cfg.Type == 113)
|
| | | {
|
| | | Dictionary<int, List<int>> userdatadic = null;
|
| | | string userdata = array[1];
|
| | |
| | | if (cfg != null)
|
| | | {
|
| | | var _itemColor = cfg.ItemColor;
|
| | | if (cfg.Type == 111)//翅膀
|
| | | if (cfg.Type == 113)//翅膀
|
| | | {
|
| | | Dictionary<int, List<int>> userdatadic = null;
|
| | | if (_dict.ContainsKey("userdata"))
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isBossPass = false;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | redpointDirty = true;
|
| | |
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent -= OnSystemNotifyEvent;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent += OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnSystemNotifyEvent(string key)
|
| | | {
|
| | | if (key == "BigRealmUpSuccess")
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<MainInterfaceWin>()
|
| | | && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin())
|
| | | {
|
| | | EffectMgr.Instance.PlayUIEffect(7047, 1800, WindowCenter.Instance.uiRoot.baseCanvas, false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshEvent(PlayerDataType dataType)
|
| | | {
|
| | | if (dataType == PlayerDataType.RealmLevel
|
| | |
| | |
|
| | | if (model.SatisfyChallengeBoss(model.displayRealmLevel))
|
| | | {
|
| | | if (model.GetBossEffectShow(model.displayRealmLevel))
|
| | | {
|
| | | DisplayEffectBoss();
|
| | | }
|
| | | else
|
| | | if (!model.GetBossEffectShow(model.displayRealmLevel))
|
| | | {
|
| | | m_RealmAnimation.StartBossEffectShow();
|
| | | m_GotoBoss.gameObject.SetActive(false);
|
| | | model.SetBossEffectShow(model.displayRealmLevel);
|
| | | return;
|
| | | }
|
| | | }
|
| | | DisplayEffectBoss();
|
| | |
|
| | | }
|
| | |
|
| | | void HideRealmUp()
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer package)
|
| | | {
|
| | | if (package.MakeType == (int)MakeType.Def_mitRuneCompound)
|
| | | if (package.MakeType == (int)MakeType.RuneCompound)
|
| | | {
|
| | | if (package.Result == 1)
|
| | | {
|
| | |
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.DogzItem, Index);
|
| | | m_ItemCell.Init(itemModel);
|
| | | m_ItemCell.countText.gameObject.SetActive(false);
|
| | | m_ItemCell.auctionIcon.gameObject.SetActive(false);
|
| | | var IudetDogzEquipPlus = itemModel.GetUseData((int)ItemUseDataKey.dogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | TextNumber.gameObject.SetActive(false);
|
| | | if (IudetDogzEquipPlus != null)
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
|
| | | if ((int)obj.MakeType == (int)MakeType.DogzEquipPlus)
|
| | | {
|
| | | GodBeastRedPoint();
|
| | | }
|
| | |
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
|
| | | if ((int)obj.MakeType == (int)MakeType.DogzEquipPlus)
|
| | | {
|
| | | m_UIEffect.Play();
|
| | | }
|
| | |
| | | }
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
|
| | | if ((int)obj.MakeType == (int)MakeType.DogzEquipPlus)
|
| | | {
|
| | |
|
| | | }
|
| | |
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | int itemId = (int)backpack_dic[index].itemId;
|
| | | if (!WingRefineExpConfig.Has(itemId) || !ItemConfig.IsWing(itemId))
|
| | | if (!WingRefineExpConfig.Has(itemId) || !ItemLogicUtility.Instance.IsWing(itemId))
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.Get(itemId);
|
| | | if (wingConfig.Type == 111 && ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
|
| | | if (wingConfig.Type == 113 && ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
|
| | | {
|
| | | WingDic.Add(index, backpack_dic[index]);
|
| | | }
|
| | |
| | | { |
| | | var item = backpack_dic[index]; |
| | | var itemId = item.itemId; |
| | | if (WingRefineExpConfig.Has(itemId) && ItemConfig.IsWing(itemId)) |
| | | if (WingRefineExpConfig.Has(itemId) && ItemLogicUtility.Instance.IsWing(itemId)) |
| | | { |
| | | var _WingsInformation = new WingsInformation(); |
| | | _WingsInformation.WingsID = itemId; |
| | |
| | | _ChildNodes._ItemIcon.SetActive(true);
|
| | | ItemModel model = playerPack.GetItemByIndex(PackType.Item, intPetAbsorbTyp[cellCount - 1]);
|
| | | _ChildNodes._ItemIcon.GetComponent<ItemCell>().Init(model);
|
| | | _ChildNodes._ItemButton.OnOneParaClick = null;
|
| | | _ChildNodes._ItemButton.onceClick = null;
|
| | | if (_DevourDIc.ContainsKey(intPetAbsorbTyp[cellCount - 1]))
|
| | | {
|
| | | _ChildNodes._Elect.SetActive(true);
|
| | |
|
| | | }
|
| | |
|
| | | _ChildNodes._ItemButton.OnOneParaClick = (int info) =>
|
| | | _ChildNodes._ItemButton.onceClick = (int info) =>
|
| | | {
|
| | | if (_ChildNodes._Elect.activeSelf)
|
| | | {
|
| | |
| | | foreach (int index in backpack_dic.Keys)
|
| | | {
|
| | | int _id = (int)backpack_dic[index].itemId;
|
| | | if (!ItemConfig.IsWing(_id))
|
| | | if (!ItemLogicUtility.Instance.IsWing(_id))
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | var wingConfig = ItemConfig.Get(_id);
|
| | | if (wingConfig.Type == 111 && ItemLogicUtility.Instance.IsJobCompatibleItem(_id))
|
| | | if (wingConfig.Type == 113 && ItemLogicUtility.Instance.IsJobCompatibleItem(_id))
|
| | | {
|
| | | markingbbol = true;
|
| | | }
|
| | |
| | | var item = items[itemIndex];
|
| | | if (WingRefineExpConfig.Has(item.itemId))
|
| | | {
|
| | | if (ItemConfig.IsWing(item.itemId))
|
| | | if (ItemLogicUtility.Instance.IsWing(item.itemId))
|
| | | {
|
| | | _wingItemDic.Add(itemIndex, item.itemId);
|
| | | WingDic.Add(itemIndex, item);
|
| | |
| | |
|
| | | private void OneKeySellSuccess(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if (obj.MakeType != (byte)MakeType.Def_mitKeySell)
|
| | | if (obj.MakeType != (byte)MakeType.OneKeySell)
|
| | | return;
|
| | |
|
| | | isStartOneKeySell = false;
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 19, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [ExecuteInEditMode] |
| | | [RequireComponent(typeof(RectTransform))] |
| | | public class UIPrefabLoader : MonoBehaviour |
| | | { |
| | | [SerializeField] string m_PrefabName; |
| | | public string prefabName { get { return m_PrefabName; } } |
| | | |
| | | GameObject instance; |
| | | |
| | | [ExecuteInEditMode] |
| | | private void Awake() |
| | | { |
| | | Create(); |
| | | } |
| | | |
| | | [ContextMenu("Create")] |
| | | public void Create() |
| | | { |
| | | if (instance != null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(m_PrefabName)) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var find = this.transform.Find(m_PrefabName); |
| | | if (find) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | instance = UIUtility.CreateWidget(m_PrefabName, m_PrefabName); |
| | | instance.transform.SetParentEx(this.transform, Vector3.zero, Quaternion.identity, Vector3.one); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dabca296a3c10864b8107dca62b132e4 |
| | | timeCreated: 1552974474 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | Loading = 5,
|
| | | }
|
| | |
|
| | | public enum PublishRegion
|
| | | {
|
| | | CN,
|
| | | TW,
|
| | | JP,
|
| | | KR,
|
| | | SA,
|
| | | EN,
|
| | | RU,
|
| | | TR,
|
| | | }
|
| | |
|
| | | public enum GestureType
|
| | | {
|
| | | Left,
|
| | |
| | | Android,
|
| | | Iphone,
|
| | | Standalone,
|
| | | }
|
| | |
|
| | |
|
| | | public enum Publisher
|
| | | {
|
| | | TheSecondWorld,
|
| | | Game_37WAN,
|
| | | shandangceshi,
|
| | | }
|
| | |
|
| | | public enum E_ActorAttribute
|
| | | {
|
| | | Hp,
|
| | | MaxHp,
|
| | | PhyAtk,
|
| | | MagAtk,
|
| | | PhyDef,
|
| | | MagDef,
|
| | | End,
|
| | | }
|
| | |
|
| | | public enum WorldMapCamp
|
| | | {
|
| | | Friendly,
|
| | | Neutral,
|
| | | Hostile,
|
| | | }
|
| | |
|
| | | public enum RoleRenameResult
|
| | |
| | | AllianceBoss2 = 33,
|
| | | //JadeDynastyBoss = 32,--诛仙功能暂时关闭
|
| | | //JadeDynastyTower = 33,
|
| | | }
|
| | |
|
| | | public enum ActivityPrepareType
|
| | | {
|
| | | HeavenBattle = 1, //仙魔之争
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | CDBPlayerRefresh_Honor = 199, //# 荣誉值
|
| | | CDBPlayerRefresh_ZhuxianRate = 200, //# 荣誉值
|
| | | CDBPlayerRefresh_ZhuxianHurtPer = 201, //# 荣誉值
|
| | |
|
| | |
|
| | | };
|
| | |
|
| | | /** 物品加成类型 */
|
| | | public enum ItemEffecttType
|
| | | {
|
| | | Def = 1004, // 外防
|
| | | Hurt = 1005, // 伤害
|
| | | Str = 1006, // 力量
|
| | | Bones = 1007, // 筋骨
|
| | | Body = 1008, // 体魄
|
| | | Shingan = 1009, // 真元
|
| | | Hp = 20000, // 生命
|
| | | Mdef = 20001, // 内防
|
| | | Windatk = 20002, // 风攻
|
| | | Fireatk = 20003, // 火攻
|
| | | Thunderatk = 20004, // 雷攻
|
| | | Iceatk = 20005, // 冰攻
|
| | | Poisionatk = 20006, // 毒攻
|
| | | Winddef = 20007, // 风抗
|
| | | Firedef = 20008, // 火抗
|
| | | Thunderdef = 20009, // 雷抗
|
| | | Icedef = 20010, // 冰抗
|
| | | Poisiondef = 20011, // 毒抗
|
| | | Hit = 20012, // 命中
|
| | | Superhit = 20013, // 暴击
|
| | | Miss = 20014, // 闪避
|
| | | InternalForce = 20015 // 内力
|
| | | }
|
| | |
|
| | | /** 背包类型码定义 */
|
| | | public enum PackType
|
| | |
| | | RunePack = 255,//符印背包
|
| | | }
|
| | |
|
| | | public enum E_DropItemType
|
| | | public enum ItemType
|
| | | {
|
| | | Copper = 1,// 铜钱
|
| | | Drugs = 7,// 药品
|
| | | Buff = 9, //Buff类型
|
| | | Gemstone = 25,// 宝石
|
| | | DropCopper = 43,// 掉落铜钱
|
| | | ComposeSuitStone = 35, //套装石碎片
|
| | | WingsMat = 39, //合成翅膀材料,羽翼精炼材料
|
| | | DropCopper = 43, // 掉落铜钱
|
| | | VipTools = 80, //vip道具
|
| | | Box = 81, //宝箱
|
| | | Equip_Weapon = 101, // 主手
|
| | | Equip_Weapon2 = 102, // 副手
|
| | | Equip_Hat = 103, // 帽子
|
| | |
| | | Equip_FairyCan1 = 110, //仙器
|
| | | Equip_FairyCan2 = 111, //仙器
|
| | | Equip_Jade = 112, //玉佩
|
| | |
|
| | | Equip_Wing = 113,// 翅膀
|
| | | Guard,// 灵守
|
| | | }
|
| | |
|
| | | /** 物品类型 */
|
| | | public enum ItemType
|
| | | {
|
| | | Buff = 9, //Buff类型
|
| | | ComposeSuitStone = 35, //套装石碎片
|
| | | WingsMat = 39, //合成翅膀材料,羽翼精炼材料
|
| | | VipTools = 80, //vip道具
|
| | | Box = 81, //宝箱
|
| | | Wings = 111, //翅膀
|
| | | SpiritAnimal = 112, //灵守
|
| | | }
|
| | |
|
| | | /** 值为列表形式,枚举值是单数 */
|
| | | enum ItemUserDataElemType
|
| | | {
|
| | | iudetShengQiStrengthCount = 0, // 圣器强化次数
|
| | | iudetShengQiAttr = 1, // 圣器附加属性
|
| | | iudetEquipEnhance = 2, // 装备强化
|
| | | iudetEquipAddSkillList = 3, // 附魔列表
|
| | | iudetEquipAddSkillCnt = 4, // 附魔次数
|
| | | iudetPetAttrList = 5, // 宠物属性,宠物名字存MakerName
|
| | | iudetEquipElem = 6, // 装备开关获得的元素属性
|
| | | iudetSaveEquipBasePropertyList = 7, // 能量库基础属性列表
|
| | | iudetIncreateMaxAddSkillCnt = 8, // 使用增加附魔(灵纹)上限道具次数
|
| | | iudetSaveEquipAddSkillList = 9, // 能量库附魔列表
|
| | | iudetSaveEquipAddSkillCnt = 10, // 能量库附魔次数
|
| | | iudetWakeUpCnt = 12, // 神兵唤醒次数
|
| | | iudetMax
|
| | | }
|
| | |
|
| | | // ---排行榜---
|
| | | // 排行榜类型BillboardType
|
| | | // 此地方改动需要通知修改ChConfig.Def_BT_Cnt, ChConfig.Def_BT_SaveType
|
| | | enum BillboardTypeList
|
| | | {
|
| | | Def_BT_Personal_LV_Day, // 个人等级日榜 0
|
| | | Def_BT_Personal_FightPower_Day, // 个人战斗力
|
| | | Def_BT_School_Sword_Day, // 门派剑宗日榜
|
| | | Def_BT_School_VitalQi_Day, // 门派气宗日榜
|
| | | Def_BT_School_Devil_Day, // 门派魔宗日榜
|
| | | Def_BT_School_Herd_Day, // 门派蝶舞日榜
|
| | | Def_BT_Pet_STR_Day, // 力量型宠物日榜
|
| | | Def_BT_Pet_PNE_Day, // 真元型宠物日榜
|
| | | Def_BT_Pet_HP_Day, // 气血型宠物日榜
|
| | | Def_BT_Action_SCQDB, // 活动, 沙场秋点兵榜
|
| | | Def_BT_Exam_ZGTX, // 答题, 智冠天下排行榜 10
|
| | | Def_BT_Exam_BSL, // 答题, 变色龙排行榜
|
| | | Def_BT_Exam_JQBD, // 答题, 举棋不定排行榜
|
| | | Def_BT_Personal_Prestige, // 个人威望排行榜
|
| | | Def_BT_PlayerFamily, // 帮会排行榜(荣誉)
|
| | | Def_BT_Exam_ZXH, // 答题, 真心话排行榜
|
| | | Def_BT_JXD_Week, // 通天塔本周排行用于查看(高手榜)
|
| | | Def_BT_JXD_Rank, // 通天塔本周排行
|
| | | Def_BT_JXD_LastWeek, // 通天塔上周排行用于奖励
|
| | | Def_BT_Personal_Carom, // 个人连斩排行榜
|
| | | Def_BT_VsRoom_FightValue, // 决斗值排行榜(竞技场积分) 20
|
| | | Def_BT_PlayerFamily_ActiveValue, // 帮会活跃度排行榜
|
| | |
|
| | | Def_BT_Campaign_LV, // 冲级(冲级大比拼)
|
| | | Def_BT_Campaign_PlayerBattle, // 战斗力(霸刀战神)
|
| | | Def_BT_Campaign_Pet_All, // 宠物总榜(最强拍档)
|
| | | Def_BT_Campaign_Pet_STR, // 宠物力量(近战)(最强拍档)
|
| | | Def_BT_Campaign_Pet_PNE, // 宠物真元(远程)(最强拍档)
|
| | | Def_BT_Campaign_Pet_HP, // 宠物气血(肉盾)(最强拍档)
|
| | | Def_BT_Campaign_Family, // 帮会(天下第一帮) |
| | | Def_BT_Campaign_FightValue, // 正邪决(顶峰论武) |
| | |
|
| | | Def_BT_Campaign_ActionTheme, // 主题周活动
|
| | | Def_BT_GoldActionRank, // 充值活动消耗元宝排行榜
|
| | | Def_BT_GoldAction_Yestarday, // 昨天充值活动消耗元宝排行榜
|
| | | Def_BT_PlayerTruck, // 当前服务器上的镖车
|
| | | Def_BT_VsRoomSuperAward, // 竞技场奖励排行榜
|
| | | Def_BT_VsRoom_FightValue_All, // 竞技场积分总榜,用于记录可领奖人员
|
| | |
|
| | | Def_BT_GloryWar_PlayerScore, // 荣耀之战本次个人积分排行36
|
| | | Def_BT_GloryWar_TotalPlayerScore, // 荣耀之战历史个人积分排行37
|
| | | Def_BT_GloryWar_AreaScore, // 荣耀之战本次区服积分排行38
|
| | | Def_BT_GloryWar_TotalAreaScore, // 荣耀之战历史区服积分排行39
|
| | | Def_BT_School_Summon_Day, // 门派XX日榜 40
|
| | |
|
| | | Def_BT_EquipStone_TotalFightPower, // 装备宝石总战斗力排行榜 41
|
| | | Def_BT_LingShou_LvExp, // 灵兽等级经验排行榜42
|
| | | Def_BT_JingMai_TotalFightPower, // 筋脉总战斗力排行榜43
|
| | |
|
| | | Def_BT_HighLadder, // 天梯竞技场排行 44
|
| | | Def_BT_HighLadder_Yester, // 天梯竞技场昨日排行 45
|
| | |
|
| | | Def_BT_Achievement, // 玩家成就排行 46
|
| | |
|
| | | Def_BT_Max, // 排行榜最大类型
|
| | | }
|
| | |
|
| | | /* 商城商品买卖状态枚举值 */
|
| | | enum GoodsSaleState
|
| | | {
|
| | | None,
|
| | | Def_GoodsSaleState_New, // 新商品 1
|
| | | Def_GoodsSaleState_Hot, // 热销商品 2
|
| | | Def_GoodsSaleState_Abate, // 限时商品 3 |
| | | Def_GoodsSaleState_Vouch, // 推荐商品 4
|
| | | Def_GoodsSaleState_FuDai, // 贴心福袋 5
|
| | | Def_GoodsSaleState_Special // 特价商品 6
|
| | | Equip_Wing = 113, // 翅膀
|
| | | Guard_1 = 114, // 灵守 1
|
| | | Guard_2 = 115, //灵守 2
|
| | | }
|
| | |
|
| | | public enum MakeType
|
| | | {
|
| | | Def_treasureSkillEquip = 1, // 法宝技能升级
|
| | | Def_mitLVUpStar = 2, // 升星
|
| | | Def_mitKeySell = 3, // 一键出售回应
|
| | | Def_mitUseFuDai = 4, // 开福袋回应
|
| | | Def_mitProduceResult = 5, // 生产采集结果回应
|
| | | Def_mitPetEquipMerge = 6, // 宠物装备合成回应
|
| | | Def_mitEquipInherit = 7, // 装备继承
|
| | | Def_mitEquipStarUpgrade = 8, // 装备升星
|
| | | Def_mitEquipMayaPlus = 9, // 装备玛雅加强
|
| | | Def_mitEquipAddAttr = 10, // 装备追加
|
| | | Def_mitEquipSlotting = 11, // 装备打孔
|
| | | Def_mitMakeScroll = 12, // 卷轴制作
|
| | | Def_mitItemCompound = 13, // 物品合成
|
| | | Def_mitMaterialCompound = 14, // 材料合成
|
| | | Def_mitEquipEvolve = 15, // 装备进阶
|
| | | Def_mitSuiteCompound = 16, // 套装合成
|
| | | Def_mitEquipDecompose = 17, // 装备分解
|
| | | Def_mitRefine = 18, // 炼丹
|
| | | Def_mitMWUpLevel = 19, //法宝进阶
|
| | | Def_DanRecycle = 20, //丹药回收
|
| | | Def_mitDogzEquipPlus = 21,// 神兽装备强化 |
| | | Def_mitRuneCompound = 22,//符印合成
|
| | | Def_mitGatherSoulCompound = 23,//聚魂合成
|
| | | Def_mitGatherSoulDecompose = 24,//聚魂分解
|
| | | OneKeySell = 3, // 一键出售回应
|
| | | EquipStarUpgrade = 8, // 装备升星
|
| | | ItemCompound = 13, // 物品合成
|
| | | DrugRefine = 18, // 炼丹
|
| | | DrugRecycle = 20, //丹药回收
|
| | | DogzEquipPlus = 21,// 神兽装备强化 |
| | | RuneCompound = 22,//符印合成
|
| | | GatherSoulCompound = 23,//聚魂合成
|
| | | GatherSoulDecompose = 24,//聚魂分解
|
| | | }
|
| | | /// <summary>
|
| | | /// 金钱类型(虚拟物品)
|
| | | /// </summary>
|
| | | public enum ConsumeType
|
| | | {
|
| | | RuneExp = 23,//符印经验
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 称号类型
|
| | | /// </summary>
|
| | |
| | | Vip = 2, //VIP称号
|
| | | Achivement = 3, //成就称号
|
| | | }
|
| | |
|
| | | //功能开启限制类型
|
| | | public enum FuncOpenEnum
|
| | | {
|
| | |
| | | SkillReducePerF = 114, //嗜天斧技能减伤百分比
|
| | | SkillReducePerG = 115, //射日神弓技能减伤百分比
|
| | | }
|
| | | //UI图标类型
|
| | | public enum SpriteFileType
|
| | | {
|
| | | Skill,
|
| | | Common,
|
| | | Item,
|
| | | Title,
|
| | | Realm,
|
| | | }
|
| | |
|
| | | //装备类型 武器 防具 仙器 项链
|
| | | public enum EquipType
|
| | | {
|
| | | Weapon,
|
| | | Defence,
|
| | | Fairy,
|
| | | Necklace,
|
| | | }
|
| | |
|
| | | public enum TextColType
|
| | | {
|
| | |
| | | Gray = 16
|
| | | }
|
| | |
|
| | | public enum E_EquipType
|
| | | {
|
| | | Weapon = 101,// 武器
|
| | | Clothes = 104,// 衣服
|
| | | Wing = 111,// 翅膀
|
| | | Proteced = 112,// 灵守
|
| | | }
|
| | |
|
| | | public enum E_ModelResType
|
| | | {
|
| | | Weapon = 1, //武器 1
|
| | |
| | | Collected,
|
| | | Collecting,
|
| | | Locked,
|
| | | }
|
| | |
|
| | | public enum HumanTreasureState
|
| | | {
|
| | | Locked,
|
| | | Challenge,
|
| | | CastSoul,
|
| | | Potential,
|
| | | Complete,
|
| | | }
|
| | |
|
| | | public enum FunctionUnlockType
|
| | |
| | | AssistXianYuanCoinsRatioAdd = 34,//助战仙缘币获得倍率加成(万分比)
|
| | | JadeDynastyBoss = 35,
|
| | | }
|
| | |
|
| | |
|
| | | public enum E_AttackMode
|
| | | {
|
| | |
| | | FinalKill,
|
| | | }
|
| | |
|
| | | public enum E_PlayerState
|
| | | {
|
| | | cpsNull = 0, ///<空闲
|
| | | cpsSit, ///<坐下
|
| | | cpsRide, ///<骑马
|
| | | cpsTruck, ///<人镖合一中
|
| | | cpsDance, ///<跳舞中
|
| | | cpsFishing, ///<钓鱼中
|
| | | cpsShopping, ///<摆摊中
|
| | | cpsDie, ///<死亡了
|
| | | cpsProduce, ///<生产中
|
| | | };
|
| | |
|
| | | public enum DungeonTargetType
|
| | | {
|
| | | NPC = 1,
|
| | |
| | | {
|
| | | EquipedTime = 3, //时间(装备的时候-1,此后每分钟-1)
|
| | | RealityTime = 9, //现实时间扣耐久
|
| | | }
|
| | |
|
| | | public enum ImageSelect
|
| | | {
|
| | | Default,
|
| | | Task,
|
| | | }
|
| | |
|
| | | public enum TitleBtnState
|
| | |
| | | if (_itemCfg != null)
|
| | | {
|
| | | _itemColor = _itemCfg.ItemColor;
|
| | | if (_itemCfg.Type == 111 && _dict != null)
|
| | | if (_itemCfg.Type == 113 && _dict != null)
|
| | | {
|
| | | _itemColor = ItemLogicUtility.Instance.GetItemQuality(_itemCfg.ID, _dict);
|
| | | }
|