public void RefreshEquipPackForItemId(int itemId) { var evoData = DataModel.SmithyEvoData; var evoItems = new List <BagItemDataModel>(); { // foreach(var item in evoData.EvolveItems) var __enumerator7 = (evoData.EvolveItems).GetEnumerator(); while (__enumerator7.MoveNext()) { var item = __enumerator7.Current; { if (!item.IsGrey && item.ItemId != -1) { evoItems.Add(item); } } } } //mEquipPackController.CallFromOtherClass("RefreshForItemId", new object[2] {itemId, evoItems}); if (itemId >= 0) { var tbEquip = Table.GetEquipBase(itemId); mEquipPackController.CallFromOtherClass("RefreshForSameEquipUpdateId", new object[2] { tbEquip.EquipUpdateLogic, evoItems }); } }
public void OnShow() { if (BackPack != null) { BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Character }); } }
public void RefreshData(UIInitArguments data) { var _arg2 = new BackPackArguments(); _arg2.Tab = 0; //BackPack.RefreshData(arg2); BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Recycle }); var _RecycleDataColorSelectCount3 = RecycleData.ColorSelect.Count; for (var i = 0; i < _RecycleDataColorSelectCount3; i++) { RecycleData.ColorSelect[i] = false; } InitializeRebirthBags(); RecycleData.ColorSelect[0] = true; SetColorChoose(0); RecycleData.ColorSelect[1] = true; SetColorChoose(1); RefurbishBags(); var _args = data as RecycleArguments; if (_args == null) { return; } if (_args.ItemDataModel != null) { var _item = _args.ItemDataModel; var _varItem = PlayerDataManager.Instance.GetItem(_item.BagId, _item.Index); _varItem.IsChoose = true; EnhanceRebirthProvision(); } RecycleData.UIGetShow = 0; }
public void RefreshData(UIInitArguments data) { var arg2 = new BackPackArguments(); arg2.Tab = 0; //BackPack.RefreshData(arg2); BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Recycle }); var RecycleDataColorSelectCount3 = RecycleData.ColorSelect.Count; for (var i = 0; i < RecycleDataColorSelectCount3; i++) { RecycleData.ColorSelect[i] = false; } InitRecycleBags(); RecycleData.ColorSelect[0] = true; SetColorSelect(0); RecycleData.ColorSelect[1] = true; SetColorSelect(1); RefleshBags(); var args = data as RecycleArguments; if (args == null) { return; } if (args.ItemDataModel != null) { var item = args.ItemDataModel; var varItem = PlayerDataManager.Instance.GetItem(item.BagId, item.Index); varItem.IsChoose = true; AddRecycleItem(); } RecycleData.UIGetShow = 0; }
public void OnShow() { if (BackPack == null) { BackPack = UIManager.Instance.GetController(UIConfig.BackPackUI); } BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Chest }); }
public void OnShow() { if (BackPack != null) { BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Character }); } //清除主界面的装备更换提示 EventDispatcher.Instance.DispatchEvent(new UIEvent_HintCloseEvent()); }
public void OnShow() { BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Character }); if (PlayerDataManager.Instance.isTaskWildShop) { DataModel.IsNPC = false; } else { DataModel.IsNPC = true; } }
//装备 private void OnBtnEquipEvent(IEvent ievent) { var _e = ievent as UIEvent_HintEquipEvent; var _index = _e.Index; var _data = m_DataModel.Entrys[_index]; var _bagItem = _data.BagItemData; IControllerBase control = UIManager.Instance.GetController(UIConfig.EquipComPareUI); control.CallFromOtherClass("ReplaceEquip", new[] { _bagItem }); }
public void UpdateWarFlagName(string name) { if (null == name) { name = string.Empty; } IControllerBase contrl = UIManager.GetInstance().GetController(UIConfig.FieldMineUI); if (contrl != null) { contrl.CallFromOtherClass("UpdateLodeAllianceName", new[] { (object)name }); } }
public void OnShow() { BackPack.CallFromOtherClass("SetPackType", new object[] { BackPackController.BackPackType.Depot }); }
private void UpdateMountInfo(bool bSendModel = false) { bool bChangeSelect = DataModel.Step != PlayerDataManager.Instance.mMountData.Step; DataModel.Step = PlayerDataManager.Instance.mMountData.Step; DataModel.Exp = PlayerDataManager.Instance.mMountData.Exp; DataModel.Level = PlayerDataManager.Instance.mMountData.Level; DataModel.RideId = PlayerDataManager.Instance.mMountData.Ride; int selectIndex = 0; int topStep = 0; int topLevel = 0; for (int i = 0; i < DataModel.MountBag.Count; i++) { var m = DataModel.MountBag[i]; m.IsGrey = PlayerDataManager.Instance.mMountData.Step >= m.Step ? 0 : 1; if (bChangeSelect == true) { m.IsSelect = false; } if (m.IsGrey == 0 && bChangeSelect) { if (m.MountId == DataModel.RideId) { selectIndex = i; topStep = 100; } else if (topStep * 100 + topLevel < m.Step * 100 + m.Level) { selectIndex = i; topStep = m.Step; topLevel = m.Level; } } } if (bChangeSelect) { DataModel.MountBag[selectIndex].IsSelect = true; DataModel.SelectMount.CopyFrom(DataModel.MountBag[selectIndex]); } DataModel.NeedItem = new ItemIdDataModel(); var tb = Table.GetMount(PlayerDataManager.Instance.mMountData.Id); if (tb == null) { return; } DataModel.MaxExp = tb.NeedExp; {//属性浮动 DataModel.AttrList.Clear(); Dictionary <int, int> dicAttr = new Dictionary <int, int>(); for (int i = 0; i < tb.Attr.Length && i < tb.Value.Length; i++) { if (tb.Attr[i] > 0) { var att = new AttributeChangeDataModel(); att.Type = tb.Attr[i]; att.Value = tb.Value[i]; DataModel.AttrList.Add(att); dicAttr.modifyValue(att.Type, att.Value); } } DataModel.FightPoint = PlayerDataManager.Instance.GetElfAttrFightPoint(dicAttr); var tbNext = Table.GetMount(tb.NextId); if (tbNext != null && tbNext.IsOpen == 1) { dicAttr.Clear(); for (int i = 0; i < tbNext.Attr.Length && i < tbNext.Value.Length; i++) { if (tbNext.Attr[i] > 0 && tbNext.Value[i] > 0) { dicAttr.modifyValue(tbNext.Attr[i], tbNext.Value[i]); } } foreach (var attr in DataModel.AttrList) { IControllerBase control = UIManager.GetInstance().GetController(UIConfig.WingUI); if (dicAttr.ContainsKey(attr.Type)) { attr.Change = dicAttr[attr.Type] - attr.Value; attr.Change = (int)control.CallFromOtherClass("AmendPropertiesValue", new[] { (object)attr.Type, (object)attr.Change }); } attr.Value = (int)control.CallFromOtherClass("AmendPropertiesValue", new[] { (object)attr.Type, (object)attr.Change }); } } } if (tb.NeedItem > 0) { needItem = tb.NeedItem; needCount = (int)Math.Ceiling((double)(tb.NeedExp - DataModel.Exp) / (double)tb.GetExp); CheckRedNotic(); } DataModel.NeedItem.ItemId = tb.NeedItem; DataModel.NeedItem.Count = PlayerDataManager.Instance.GetItemCount(tb.NeedItem); if (bSendModel) { SendModel(); EventDispatcher.Instance.DispatchEvent(new MountEffect_Event(0)); } {//init next string int maxLv = 0; int maxStep = 0; Table.ForeachMount(tbMount => { if (tbMount.Step > maxStep && tbMount.IsOpen == 1 && tbMount.Special == 0) { maxStep = tbMount.Step; } if (tbMount.Step != DataModel.Step) { return(true); } if (tbMount.Level > maxLv) { maxLv = tbMount.Level; } return(true); }); if (maxStep > DataModel.Step) {//还可以进阶 int dis = maxLv - DataModel.Level + 1; DataModel.strNextStep = string.Format(GameUtils.GetDictionaryText(274001), dis); } else {//以达到最大阶 DataModel.strNextStep = GameUtils.GetDictionaryText(274002); DataModel.IsMaxLevel = maxLv == DataModel.Level ? 1 : 0; } } }