internal EquipmentsGroupByMasterID(EquipmentInfo rpInfo, EquipmentTypeViewModel rpType, IEnumerable<Equipment> rpEquipments) { Info = rpInfo; Type = rpType; r_LevelMap = rpEquipments.GroupBy(r => new EquipmentGroupingKey(r.Level, r.Proficiency)).ToDictionary(r => r.Key, r => new EquipmentsGroupByLevel(r.Key, r)); Levels = r_LevelMap.OrderBy(r => r.Key.Level).ThenBy(r => r.Key.Proficiency).Select(r => r.Value).ToArray().AsReadOnly(); }
internal EquipmentTypeGroupViewModel(EquipmentInfo rpInfo, EquipmentTypeViewModel rpType, IEnumerable<Equipment> rpEquipments) { Info = rpInfo; Type = rpType; Levels = new ObservableRangeCollection<EquipmentLevelGroupViewModel>(); var rLevels = rpEquipments.GroupBy(r => r.Level).OrderBy(r => r.Key).Select(r => new EquipmentLevelGroupViewModel(r.Key, r, Info)); DispatcherUtil.UIDispatcher.BeginInvoke(new Action<IEnumerable<EquipmentLevelGroupViewModel>>(Levels.AddRange), rLevels); }
internal EquipmentGroupByMasterID(EquipmentInfo rpInfo, EquipmentTypeViewModel rpType, IEnumerable<Equipment> rpEquipment) { Info = rpInfo; Type = rpType; foreach (var rGroup in rpEquipment.GroupBy(r => new EquipmentGroupingKey(r.Level, r.Proficiency))) r_LevelMap.Add(rGroup.Key, new EquipmentGroupByLevel(this, rGroup.Key, rGroup)); Levels = r_LevelMap.OrderBy(r => r.Key.Level).ThenBy(r => r.Key.Proficiency).Select(r => r.Value).ToArray().AsReadOnly(); }
public EquipmentLevelGroupViewModel(int rpLevel, IEnumerable<Equipment> rpEquipments, EquipmentInfo rpInfo) { Level = rpLevel; Count = rpEquipments.Count(); Info = rpInfo; EquipedShips = new ObservableRangeCollection<EquipedShipViewModel>(); Task.Run(() => { var rData = App.Root.Game.Ships.Ships.Select(r => new EquipedShipViewModel(r, r.Model.Slots.Count(rpSlot => rpSlot.Equipment.Info == Info && rpSlot.Equipment.Level == Level))).Where(r => r.Count > 0); DispatcherUtil.UIDispatcher.BeginInvoke(new Action<IEnumerable<EquipedShipViewModel>>(EquipedShips.AddRange), rData); }); }
/// <summary> /// 判断名称是否存在 /// </summary> /// <param name="info"></param> /// <returns>true:已存在;fasel:不存在。</returns> public bool ExistsEquipment(EquipmentInfo model) { StringBuilder sqlBuilder = new StringBuilder(); StringBuilder whereBuilder = new StringBuilder(); List <DataParameter> parameters = new List <DataParameter>(); int count = 0; try { sqlBuilder.Append("SELECT COUNT(0) FROM T_FP_EQUIPMENT"); whereBuilder.Append(" AND PID <> @PID "); parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID }); if (!string.IsNullOrEmpty(model.ECODE)) { whereBuilder.Append(" AND ECODE = @ECODE "); parameters.Add(new DataParameter { ParameterName = "ECODE", DataType = DbType.String, Value = model.ECODE }); } if (whereBuilder.Length > 0) { sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); } using (IDataSession session = AppDataFactory.CreateMainSession()) { count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); } return(count > 0); } catch (Exception ex) { throw ex; } }
public void SetEquipmentInfo(EquipmentInfo equipmentInfo) { _equipmentInfo = equipmentInfo; TransformUtil.ClearChildren(equipIconRoot, true); CommonEquipmentIcon icon = CommonEquipmentIcon.Create(equipIconRoot); icon.SetEquipmentInfo(_equipmentInfo); icon.GetEquipmentDesButton().enabled = false; icon.ButtonEnable(false); equipmentNameText.text = Localization.Get(_equipmentInfo.equipmentData.name); attrViewPrefab.gameObject.SetActive(true); for (int i = 0, count = equipmentInfo.EquipAttribute.Count; i < count; i++) { EquipAttributeView v = Instantiate <EquipAttributeView>(attrViewPrefab); v.transform.SetParent(attrRoot, false); v.Set(equipmentInfo.EquipAttribute[i]); } attrViewPrefab.gameObject.SetActive(false); priceText.text = _equipmentInfo.equipmentData.price.ToString(); }
public JsonResult GetSysRequestList(int equipmentID, int typeID, EquipmentInfo equipmentInfo) { if (CheckSession() == false) { return(Json(ResultModelBase.CreateTimeoutModel(), JsonRequestBehavior.AllowGet)); } if (CheckSessionID() == false) { return(Json(ResultModelBase.CreateLogoutModel(), JsonRequestBehavior.AllowGet)); } ResultModel <List <DateTime> > result = new ResultModel <List <DateTime> >(); try { result.Data = this.equipmentManager.GetSysRequestList(equipmentID, typeID, equipmentInfo); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, ex.Message); result.SetFailed(ResultCodes.SystemError, ControlManager.GetSettingInfo().ErrorMessage); } return(JsonResult(result)); }
public static int CompareEquipmentWeight(EquipmentInfo aEquipmentInfo, EquipmentInfo bEquipmentInfo, EquipmentType curType, RoleType roleType, bool isAsc) { EquipmentType aType = aEquipmentInfo.equipmentData.equipmentType; EquipmentType bType = bEquipmentInfo.equipmentData.equipmentType; int aTypeW = curType == aType ? 5 :aType == EquipmentType.PhysicalWeapon ? 4 : aType == EquipmentType.Armor ? 3 : aType == EquipmentType.Accessory ? 2 :1; int bTypeW = curType == bType ? 5 :aType == EquipmentType.PhysicalWeapon ? 4 : bType == EquipmentType.Armor ? 3 : bType == EquipmentType.Accessory ? 2 :1; if (bTypeW - aTypeW != 0) { return(bTypeW - aTypeW); } aTypeW = aEquipmentInfo.equipmentData.equipmentRoleType == roleType ? 2 : 1; bTypeW = bEquipmentInfo.equipmentData.equipmentRoleType == roleType ? 2 : 1; if (bTypeW - aTypeW != 0) { return(bTypeW - aTypeW); } if (isAsc) { return(-CompareEquipmentQuality(aEquipmentInfo, bEquipmentInfo)); } return(CompareEquipmentQuality(aEquipmentInfo, bEquipmentInfo)); }
/// <summary> /// 刷新身上装备 /// </summary> void RefreshEquipment() { if (curTargetInfo == null) { return; } /////填充空白 for (int i = 0; i < equipItems.Length; i++) { if (equipItems[i] != null) { equipItems[i].FillInfo(null); } } /////填充已经装备好的数据 for (int i = 0, max = curTargetInfo.RealEquipmentInfoList.Count; i < max; i++) { EquipmentInfo item = curTargetInfo.RealEquipmentInfoList[i]; if (equipItems.Length > (int)item.Slot - 1 && equipItems[(int)item.Slot - 1] != null) { equipItems[(int)item.Slot - 1].FillInfo(item); } } }
private EquipmentInfo GatherEquipmentInfo() { EquipmentInfo equipmentInfo = new EquipmentInfo(); equipmentInfo.EquipmentType = this.hdnEquipmentType.Value; equipmentInfo.EquipmentManCode = this.txtManCode.Value.Trim(); equipmentInfo.EquipmentName = this.txtEquipName.Text.Trim(); equipmentInfo.Spec = this.txtSpec.Text.Trim(); equipmentInfo.ThePrecision = this.txtPrecision.Text.Trim(); equipmentInfo.Manufacturer = this.txtFactory.Text.Trim(); equipmentInfo.FactoryCode = this.txtFacCode.Text.Trim(); if (this.DateFactory.Text.Trim() == "") { equipmentInfo.FactoryDate = Convert.ToDateTime(DateTime.MinValue.ToShortTimeString()); } else { equipmentInfo.FactoryDate = Convert.ToDateTime(this.DateFactory.Text); } if (this.DatePursh.Text.Trim() == "") { equipmentInfo.PurchaseDate = Convert.ToDateTime(DateTime.MinValue.ToShortTimeString()); } else { equipmentInfo.PurchaseDate = Convert.ToDateTime(this.DatePursh.Text); } equipmentInfo.CheckCycle = int.Parse(this.txtCheck.Text.Trim()); equipmentInfo.ServiceYear = int.Parse(this.txtSerYear.Text.Trim()); equipmentInfo.OriginalPrice = Convert.ToDecimal(this.txtOriginal.Text); equipmentInfo.State = int.Parse(this.drpState.SelectedValue); equipmentInfo.Remark = this.txtRemark.Text.Trim(); equipmentInfo.depreciation = decimal.Parse(this.txtdepreciation.Text); equipmentInfo.ContactDept = this.HdnContractDept.Value.Trim(); return(equipmentInfo); }
private void SaveItem() { // 从每个选中的行中获取ID(在Grid1中定义的DataKeyNames) List <int> ids = GetSelectedDataKeyIDs(Grid1); WHGoodsDetail whGoodsEntity = new WHGoodsDetail(); EquipmentInfo goodsEntity = new EquipmentInfo(); EquipmentTypeInfo goodsTypeEntity = new EquipmentTypeInfo(); LossOrderDetail dbEntity = new LossOrderDetail(); // 执行数据库操作 foreach (int ID in ids) { //获取物品信息 whGoodsEntity = Core.Container.Instance.Resolve <IServiceWHGoodsDetail>().GetEntity(ID); if (goodsEntity != null) { whGoodsEntity.GoodsInfo = Core.Container.Instance.Resolve <IServiceEquipmentInfo>().GetEntity(whGoodsEntity.GoodsID); //获取商品类别信息 goodsTypeEntity = Core.Container.Instance.Resolve <IServiceEquipmentTypeInfo>().GetEntity(whGoodsEntity.GoodsTypeID); //判断是否已经添加改商品物品 if (!IsExists(ID)) { dbEntity = new LossOrderDetail(); dbEntity.OrderNO = OrderNO; dbEntity.OrderDate = DateTime.Now; dbEntity.GoodsID = whGoodsEntity.GoodsID; dbEntity.GoodsNumber = 1; dbEntity.GoodsUnit = whGoodsEntity.InventoryUnit; dbEntity.GoodsUnitPrice = whGoodsEntity.InventoryUnitPrice; dbEntity.GoodTotalPrice = Math.Round(dbEntity.GoodsNumber * dbEntity.GoodsUnitPrice, 2); //保存领用物品信息 Core.Container.Instance.Resolve <IServiceLossOrderDetail>().Create(dbEntity); } } } }
/// <summary> /// 从仓库取出 /// </summary> public static void TryTakeOutStorage(this EquipmentInfo _eq) { if (_eq.BelongTo == EquipmentBelongTo.STORAGE) { StorageWnd storageWnd = GameCenter.uIMng.GetGui <StorageWnd>(); if (storageWnd != null) { GameCenter.inventoryMng.C2S_AskTakeOutStorage((uint)_eq.InstanceID); } else { GuildStorageWnd guildStorageWnd = GameCenter.uIMng.GetGui <GuildStorageWnd>(); if (guildStorageWnd != null) { if (GameCenter.guildMng.MyGuildInfo != null && GameCenter.guildMng.MyGuildInfo.MyPosition != GuildMemPosition.MEMBER) { GameCenter.guildMng.C2S_MoveStorageItem(2, _eq.InstanceID); } else { GameCenter.guildMng.C2S_MemCheckOutItem(_eq.InstanceID); } } } } else if (_eq.BelongTo == EquipmentBelongTo.WAREHOUSE) { List <int> list = new List <int>(); list.Add(_eq.InstanceID); GameCenter.treasureHouseMng.C2S_ReqTakeOutHouse(list, false); } else { Debug.Log("操作异常"); } }
public override void OnSingleClick(Mobile from) { ArrayList attrs = new ArrayList(); int num = 1041424; attrs.Add(new EquipInfoAttribute(num, m_Charges)); int number; if (Name == null) { number = 1017085; } else { this.LabelTo(from, Name); number = 1041000; } EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute))); from.Send(new DisplayEquipmentInfo(this, eqInfo)); }
public void SetCurTryShowEquip(EquipSlot _slot, EquipmentInfo _eq) { tryShowEquipments[_slot] = _eq; }
public ImplicitEquipment(EquipmentInfo equipmentInfo, int improvementLevel = 0, int airProficiency = 0) { Info = equipmentInfo; ImprovementLevel = improvementLevel; AirProficiency = airProficiency; }
private void LoadEquipmentControl() { ttbEquipmentFilter.Text = ttbEquipmentFilter.Text.Trim(); ddlEquipment.Items.Clear(); EquipmentInfo equipmant = null; if (ttbEquipmentFilter.Text.IsNullOrTrimEmpty() == false) { equipmant = EquipmentInfo.GetEquipmentByName(ttbEquipmentFilter.Text); } if (equipmant != null) { ddlEquipGroup.Items.Clear(); //ddlEquipGroup.Items.Insert(0, new ListItem(ddlEquipment.ProductName, device.ProductName)); ddlEquipment.Items.Add(new ListItem(equipmant.EquipmentName, equipmant.EquipmentName)); ddlEquipment_SelectedIndexChanged(ddlEquipment, EventArgs.Empty); } else { if (ddlEquipGroup.SelectedItem.Text.IsNullOrTrimEmpty() == true) { return; } List <string> paras = new List <string>(); sql = @"SELECT {0} FROM MES_EQP_GROUP_EQP G WHERE G.EQP_GROUP_SID = #[STRING] "; paras.Add(ddlEquipGroup.SelectedItem.Value); if (ttbEquipmentFilter.Text.IsNullOrTrimEmpty() == false) { sql += " AND G.EQUIPMENT LIKE #[STRING] "; paras.Add(ttbEquipmentFilter.Text + "%"); } if (DBCenter.GetSingleResult <int>(string.Format(sql, "COUNT(G.EQUIPMENT)"), paras.ToArray()) > maxReturnQty) { ddlEquipment.Items.Add(new ListItem(GetUIResource("InputRequired", lblEquipment.Text), string.Empty)); } else { List <EquipGroupEquipInfo> equipmentList = InfoCenter.GetList <EquipGroupEquipInfo>(string.Format(sql + " ORDER BY G.EQUIPMENT", "G.EQUIPMENT"), paras.ToArray()); ddlEquipment.DataSource = equipmentList; ddlEquipment.DataTextField = "EquipmentName"; ddlEquipment.DataValueField = "EquipmentName"; ddlEquipment.DataBind(); if (equipmentList.Count == 0) { ddlEquipment.Items.Add(new ListItem(TextMessage.Error.T00550(""), string.Empty)); } if (equipmentList.Count == 1) { ddlEquipment_SelectedIndexChanged(ddlEquipment, EventArgs.Empty); } if (equipmentList.Count > 1) { ddlEquipment.Items.Insert(0, ""); } } } }
/// <summary> /// 背包更新单个数据 /// </summary> protected void UpdateItems(int pos, EquipmentInfo eq) { RefreshItems(); }
void ShowItemInfo() { enoughCoin = true; enoughMaterial = true; bigEquipLevel = false; lackEquipList.Clear(); EquipmentInfo equip = GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo == null?null:new EquipmentInfo(GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo, EquipmentBelongTo.PREVIEW); if (curItemUI != null) { curItemUI.FillInfo(equip); } if (equip != null) { if (curAttr != null) { curAttr.text = GameHelper.GetAttributeNameAndValue(equip.AttributePairList); } PromoteRef promoteRef = ConfigMng.Instance.GetPromoteRefByEid(equip.EID); if (promoteRef != null) { EquipmentInfo info = new EquipmentInfo(equip, promoteRef.end_item); if (info != null) { targetEquipNobind = (equip.IsBind && info.BindType == EquipmentBindType.UnBind); } bigEquipLevel = (info.UseReqLevel > GameCenter.mainPlayerMng.MainPlayerInfo.CurLevel); if (targetItemUI != null) { targetItemUI.FillInfo(info); targetItemUI.SetBindByClient(info.BindType == EquipmentBindType.UnBind); } if (targetAttr != null) { targetAttr.text = GameHelper.GetAttributeNameAndValue(info.AttributePairList); } System.Text.StringBuilder builder = new System.Text.StringBuilder(); bool enough = false; EquipmentInfo lackEquip = null; for (int i = 0, max = promoteRef.materialItem.Count; i < max; i++) { string str = GameHelper.GetStringWithBagNumber(promoteRef.materialItem[i], out enough); if (enough == false) { enoughMaterial = enough; } builder.Append(str); if (i < max - 1) { builder.Append("\n"); } } ItemValue coinItem = new ItemValue(5, (int)promoteRef.coin); string coinStr = GameHelper.GetStringWithBagNumber(coinItem, out enoughCoin, out lackEquip); if (labCoin != null) { labCoin.text = coinStr; } if (lackEquip != null) { lackEquipList.Add(lackEquip); } if (labStone != null) { labStone.text = builder.ToString(); } } else { // GameCenter.messageMng.AddClientMsg("升阶表中查不到此装备!"); if (targetItemUI != null) { targetItemUI.FillInfo(null); } if (targetAttr != null) { targetAttr.text = string.Empty; } if (labStone != null) { labStone.text = string.Empty; } if (labCoin != null) { labCoin.text = string.Empty; } } GameCenter.equipmentTrainingMng.quickBuyList = lackEquipList; } else { if (targetItemUI != null) { targetItemUI.FillInfo(null); } if (curAttr != null) { curAttr.text = string.Empty; } if (targetAttr != null) { targetAttr.text = string.Empty; } if (labStone != null) { labStone.text = string.Empty; } if (labCoin != null) { labCoin.text = string.Empty; } } }
private void InitEquipmentInfo() { if (equipments == null) { equipments = new EquipmentInfo[equipmentNum]; for (int i = 0; i < equipmentNum; i++) { equipments[i] = new EquipmentInfo(); } } equipments[0].type = 0; // zhi li equipments[0].data = 10; equipments[1].type = 0; equipments[1].data = 9; equipments[2].type = 0; equipments[2].data = 9; equipments[3].type = 0; equipments[3].data = 8; equipments[4].type = 0; equipments[4].data = 7; equipments[5].type = 1; // ji li equipments[5].data = 10; equipments[6].type = 2; // sheng ming equipments[6].data = 10; equipments[7].type = 1; equipments[7].data = 10; equipments[8].type = 3; // wu li equipments[8].data = 10; equipments[9].type = 3; equipments[9].data = 10; equipments[10].type = 3; equipments[10].data = 9; equipments[11].type = 3; equipments[11].data = 9; equipments[12].type = 3; equipments[12].data = 8; equipments[13].type = 3; equipments[13].data = 5; equipments[14].type = 3; equipments[14].data = 7; equipments[15].type = 3; equipments[15].data = 7; equipments[16].type = 3; equipments[16].data = 6; equipments[17].type = 3; equipments[17].data = 6; equipments[18].type = 3; equipments[18].data = 6; equipments[19].type = 3; equipments[19].data = 4; equipments[20].type = 3; equipments[20].data = 4; equipments[21].type = 3; equipments[21].data = 4; equipments[22].type = 3; equipments[22].data = 4; equipments[23].type = 3; equipments[23].data = 4; equipments[24].type = 3; equipments[24].data = 2; equipments[25].type = 3; equipments[25].data = 2; equipments[26].type = 3; equipments[26].data = 2; equipments[27].type = 4; equipments[27].data = 3; equipments[28].type = 4; equipments[28].data = 4; equipments[29].type = 4; equipments[29].data = 2; equipments[30].type = 4; equipments[30].data = 1; }
public override void OnSingleClick(Mobile from) { ArrayList attrs = new ArrayList(); if (DisplayLootType) { if (LootType == LootType.Blessed) { attrs.Add(new EquipInfoAttribute(1038021)); // blessed } else if (LootType == LootType.Cursed) { attrs.Add(new EquipInfoAttribute(1049643)); // cursed } } if (!Identified) { attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified } else { int num = 0; switch (m_WandEffect) { case WandEffect.Clumsiness: num = 3002011; break; case WandEffect.Identification: num = 1044063; break; case WandEffect.Healing: num = 3002014; break; case WandEffect.Feeblemindedness: num = 3002013; break; case WandEffect.Weakness: num = 3002018; break; case WandEffect.MagicArrow: num = 3002015; break; case WandEffect.Harming: num = 3002022; break; case WandEffect.Fireball: num = 3002028; break; case WandEffect.GreaterHealing: num = 3002039; break; case WandEffect.Lightning: num = 3002040; break; case WandEffect.ManaDraining: num = 3002041; break; } if (num > 0) { attrs.Add(new EquipInfoAttribute(num, m_Charges)); } } int number; if (Name == null) { number = 1017085; } else { this.LabelTo(from, Name); number = 1041000; } if (attrs.Count == 0 && Crafter == null && Name != null) { return; } EquipmentInfo eqInfo = new EquipmentInfo(number, Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute))); from.Send(new DisplayEquipmentInfo(this, eqInfo)); }
protected void RefreshItems() { ///根据数据层的数据刷新UI if (this == null) { return; } List <int> refreshList = new List <int>(); int index = 0; //eqList是当前的数据集引用 //遍历该数据集 for (int i = 0, max = eqList.Count; i < max; i++) { EquipmentInfo eq = eqList[i]; //如果数据集中有空数据,那么根据策划需求,不展示该空位,直接跳过 if (eq == null) { index++; continue; } ItemUI go = null; refreshList.Add(index); //如果该物品的数据中的从属属性为预览,比如说在某些奖励界面,那么可能需要展示高光效果提醒玩家。做区别处理。 如果从属属性是已经属于玩家, //比如是从属背包,身上,仓库,那么不需要做该处理。 这个应该是邓成加的,我个人不建议在上层管理界面做这样的事情,应该交由ItemUI组件对象内部封装处理,上层 //只调用ItemUI的统一接口。但是可能当时他这么做有一些机制上的难处,无伤大雅。修改需要谨慎 if (eq.BelongTo == EquipmentBelongTo.PREVIEW) { //刷新列表存入该刷新记录,这种新建列表的方式一般是出于本次执行本身就是在一个列表的for循环内部,在列表的for循环内部是禁止对列表本身进行操作的。所以有 //时候需要新建一个列表来记录一些事情,当for循环结束以后,再用这个记录去操作原列表 //根据序列index尝试去界面容器中获取表现层UI对象 if (girdDic.TryGetValue(index, out go)) { //如果获取成功,则将数据层对象 填入 表现层UI对象 , 表现层UI对象 在获取数据层对象后,自行刷新 go.FillInfo(eq); if (showLightFlag) { go.ShowLightFlag(); } //表现层对象激活 go.gameObject.SetActive(true); } } else { if (girdDic.TryGetValue(index, out go)) { go.FillInfo(eq); go.gameObject.SetActive(true); } } index++; } //便利界面容器中的表现层对象列表 using (var e = girdDic.GetEnumerator()) { while (e.MoveNext()) { int item = e.Current.Key; girdDic[item].Forbidden(false); //如果发现之前数据刷新过程中,不包含针对该表现层ui对象的处理,那么说明本次刷新,没这个表现层ui什么事,那么他应该表现为一个空格子,或者隐藏掉, if (!refreshList.Contains(item)) { //所以需要给他填入一个空数据,让他自己去处理对应的表现 girdDic[item].FillInfo(null); //根据本容器的属性 即 isHideNullSlot 或者是否为分类刷新(根据龙之契约的策划要求,分类刷新是一概不表现空格子的),来决定,这里是表现一个空格子,还是隐藏 if (isHideNullSlot || curFilterType != FilterType.ALL) { girdDic[item].gameObject.SetActive(false); } else { girdDic[item].gameObject.SetActive(true); } } if (isRecycle && girdDic[item].EQInfo != null) { girdDic[item].ShowTooltip = false; girdDic[item].GetComponent <UIToggle>().group = 0; if (girdDic[item].EQInfo.RecycleType == GoodsRecycleType.NO) { girdDic[item].Forbidden(true); } } } } //根据当前的刷新类型来进行排序和隐藏 FliterItems(curFilterType); // } //如果之前有选中物品的异步任务,那么在刷新结束之后,完成该任务,选中某个格子 if (curAsyncSelectIndex >= 0) { SelectItem(curAsyncSelectIndex); } }
public void Refresh(WdfActiveDetailsData _info, WdfActiveTypeData _data) { if (_info == null) { return; } info = _info; id = _data.type; severId = _data.id; for (int i = 0; i < _info.reward_info.Count; i++) { if (i < items.Count) { if (items[i] != null) { EquipmentInfo eq = _info.reward_info[i]; if (eq != null) { items[i].FillInfo(eq); } items[i].ShowTooltip = true; items[i].gameObject.SetActive(true); } } } if (rewardDes != null && !string.IsNullOrEmpty(_info.desc)) { rewardDes.text = _info.desc; rewardDes.gameObject.SetActive(true); } if (nums != null) { if (_data.counter_value < _info.value1) { nums.text = _data.counter_value.ToString() + "/" + _info.value1.ToString(); } else { nums.text = _info.value1.ToString() + "/" + _info.value1.ToString(); } nums.gameObject.SetActive(id != 3 && id != 5 && id != 6 && id != 7 && id != 8 && id != 9 && id != 10 && id != 66 && id != 11); } if (getEx != null) { getEx.IsGray = UISpriteEx.ColorGray.normal; } if (lastObj != null) { lastObj.SetActive(id == 8 || id == 9 && _info.lastName != null); } if (curObj != null) { curObj.SetActive(id == 8 || id == 9); } if (lastGetReward != null)//上届得主 { lastGetReward.text = _info.lastName; lastGetReward.gameObject.SetActive(id == 8 || id == 9); } if (curPlayer != null)//当前玩家 { curPlayer.text = _info.curName; curPlayer.gameObject.SetActive(id == 8 || id == 9); } if (getBtn != null) { if (id != 11) { UIEventListener.Get(getBtn).onClick = GetReward; } getBtn.gameObject.SetActive(false); } if (getEffect != null) { getEffect.SetActive(false); } if (getedBtn != null) { getedBtn.gameObject.SetActive(false); } if (rechargeBtn != null) { UIEventListener.Get(rechargeBtn).onClick = GoRecharge; rechargeBtn.gameObject.SetActive(false); } if (strongBtn != null) { UIEventListener.Get(strongBtn).onClick = GoStrong; rechargeBtn.gameObject.SetActive(false); } if (id == 66) { if (_info.reward_times == 0)//已经领取 { if (getedBtn != null) { getedBtn.SetActive(true); } } else//没有领取 { if (getBtn != null) { getBtn.gameObject.SetActive(true); } if (_info.total_reward_times >= _info.reward_times && _info.total_reward_times > 0)//可以领取 { if (getEx != null) { getEx.IsGray = UISpriteEx.ColorGray.normal; } } else//不可领取 { if (getEx != null) { getEx.IsGray = UISpriteEx.ColorGray.Gray; } } } } else { if (_info.total_reward_times > _info.reward_times && _info.total_reward_times > 0) { if (getBtn != null) { getBtn.gameObject.SetActive(true); } if (getEffect != null) { getEffect.SetActive(true); if (id == 11)//连充豪礼直接点击物品领取 { if (items.Count > 0) { items[0].ShowTooltip = false; UIEventListener.Get(items[0].gameObject).onClick = GetReward; } } } } if (_info.total_reward_times == _info.reward_times && _info.total_reward_times > 0) { if (getedBtn != null) { getedBtn.SetActive(true); } } if (_info.total_reward_times < 1) { if (id != 5 && id != 6 && id != 7 && id != 8 && id != 9) { if (rechargeBtn != null) { rechargeBtn.SetActive(true); if ((id == 10) && _data.counter_value == 1)//已经激活 { rechargeBtn.SetActive(false); if (getBtn != null) { getBtn.gameObject.SetActive(true); } if (getEx != null) { getEx.IsGray = UISpriteEx.ColorGray.Gray; } } } } else { if (id == 5) { if (strongBtn != null) { strongBtn.SetActive(true); } } if (id == 6) { if (wingBtn != null) { wingBtn.SetActive(true); UIEventListener.Get(wingBtn).onClick = GoWing; } } if (id == 7) { if (strongEquipBtn != null) { strongEquipBtn.SetActive(true); UIEventListener.Get(strongEquipBtn).onClick = GoStrongEquip; } } if (id == 8 | id == 9) { if (flowerBtn != null) { flowerBtn.SetActive(true); UIEventListener.Get(flowerBtn).onClick = GoFlowerRank; } } } } } }
/// <summary> /// 从背包中选中物品操作 /// </summary> void ChooseBagItem(GameObject go) { EquipmentInfo info = (EquipmentInfo)UIEventListener.Get(go).parameter; ChooseOne(info); }
/// <summary> /// 显示身上的装备 /// </summary> /// <param name="itemDic">装备列表</param> /// <param name="needCheckFirst">If set to <c>true</c> 是否需要选中第一个装备</param> void ShowEquipItems(Dictionary <EquipSlot, EquipmentInfo> itemDic, bool needCheckFirst = true) { HideAllGoItems(); int index = 0; DecomposeItemUI firstOne = null; DecomposeItemUI checkedOne = null; List <EquipmentInfo> itemList = new List <EquipmentInfo>(itemDic.Values); itemList.Sort(CompareEquip); for (int i = 0, count = itemList.Count; i < count; i++) { EquipmentInfo info = itemList[i]; if (info == null) { continue; } EquipmentInfo selectOne = GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo; //继承的副装备必须部位相同、职业相同、且排除主装备本身 if (GameCenter.equipmentTrainingMng.CurSlot != EquipSlot.None && (GameCenter.equipmentTrainingMng.CurSlot != info.Slot || (selectOne != null && (selectOne.NeedProf != info.NeedProf || info.InstanceID == selectOne.InstanceID)))) { continue; } //选中了副装备就隐藏副装备 if (GameCenter.equipmentTrainingMng.CurViceEquipmentInfo != null && GameCenter.equipmentTrainingMng.CurViceEquipmentInfo.InstanceID == info.InstanceID) { continue; } DecomposeItemUI itemUI = null; if (!allGoItems.ContainsKey(index)) { if (equipGo != null) { itemUI = equipGo.CreateNew(itemParent.transform); } allGoItems[index] = itemUI; } itemUI = allGoItems[index]; itemUI.gameObject.SetActive(true); itemUI.SetData(info, ChooseBagItem, initSubGUIType); if (index == 0 && needCheckFirst) { firstOne = itemUI; } if (!needCheckFirst && selectOne != null && info.InstanceID == selectOne.InstanceID) { checkedOne = itemUI; //不是第一个的默认选中 } index++; } if (firstOne != null && needCheckFirst) { firstOne.SetChecked(); } if (!needCheckFirst && checkedOne != null) { checkedOne.SetChecked(); //不是第一个的默认选中 } if (scrollView != null) { scrollView.SetDragAmount(0, 0, false); } if (itemParent != null) { itemParent.repositionNow = true; } if (itemDic.Count == 0) { GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo = null; } }
public override void OnSingleClick(Mobile from) { ArrayList attrs = new ArrayList(); if (DisplayLootType) { if (LootType == LootType.Blessed) { attrs.Add(new EquipInfoAttribute(1038021)); // blessed } else if (LootType == LootType.Cursed) { attrs.Add(new EquipInfoAttribute(1049643)); // cursed } } if (m_Quality == ItemQuality.Exceptional) { attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality)); } if (m_ReplenishesCharges) { attrs.Add(new EquipInfoAttribute(1070928)); // Replenish Charges } // TODO: Must this support item identification? if (m_Slayer != SlayerName.None) { SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer); if (entry != null) { attrs.Add(new EquipInfoAttribute(entry.Title)); } } if (m_Slayer2 != SlayerName.None) { SlayerEntry entry = SlayerGroup.GetEntryByName(m_Slayer2); if (entry != null) { attrs.Add(new EquipInfoAttribute(entry.Title)); } } int number; if (Name == null) { number = LabelNumber; } else { LabelTo(from, Name); number = 1041000; } if (attrs.Count == 0 && Crafter == null && Name != null) { return; } EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray(typeof(EquipInfoAttribute))); from.Send(new DisplayEquipmentInfo(this, eqInfo)); }
public QuestEquipmentReward(int rpEquipmentID, int rpCount) : base(rpCount) { Equipment = KanColleGame.Current.MasterInfo.Equipment[rpEquipmentID]; Quantity = rpCount; }
string PreviewOne(Dictionary <int, EquipmentInfo> equipDic) { System.Text.StringBuilder builder = new System.Text.StringBuilder(); Dictionary <int, ItemValue> itemList = new Dictionary <int, ItemValue>(); int coinNum = 0; bool haveHighQualityEquip = false; using (var e = equipDic.GetEnumerator()) { while (e.MoveNext()) { EquipmentInfo temp = e.Current.Value; if (temp == null) { continue; } coinNum += temp.Price; //if(temp.Quality <= 3)continue;//蓝色及以下只有铜币 if (temp.IsEquip) { haveHighQualityEquip = true;//有稀有物品 StrengthenRef strengthenRef = ConfigMng.Instance.GetStrengthenRefByLv(temp.UpgradeLv); if (strengthenRef != null) { for (int j = 0, maxJ = strengthenRef.decoItems.Count; j < maxJ; j++) { ItemValue item = strengthenRef.decoItems[j]; if (item.eid == 5)// 分解强化的装备也给钱 { coinNum += item.count; } else { AddOne(itemList, item); } } } List <ItemValue> luckyItems = ConfigMng.Instance.GetEquipmentListByLuckyLv(temp.LuckyLv); for (int i = 0, max = luckyItems.Count; i < max; i++) { ItemValue item = luckyItems[i]; AddOne(itemList, item); } List <ItemValue> qualityList = ConfigMng.Instance.GetResolveItemListByLv(temp.UseReqLevel, temp.Quality, (int)temp.Slot); for (int h = 0, maxh = qualityList.Count; h < maxh; h++) { ItemValue item = qualityList[h]; AddOne(itemList, item); } } else if (temp.Family == EquipmentFamily.MOUNTEQUIP) { MountStrenConsumeRef mouuntStren = ConfigMng.Instance.GetMountStrenConsumeRef(temp.UpgradeLv); if (mouuntStren != null) { if (mouuntStren.deco_cons != null && mouuntStren.deco_cons.eid != 0) { AddOne(itemList, mouuntStren.deco_cons); } } MountEquQuailtRef quality = ConfigMng.Instance.GetMountEquipQualityRef(temp.Quality, temp.Slot); if (quality != null) { if (quality.deco_cons != null && quality.deco_cons.eid != 0) { AddOne(itemList, quality.deco_cons); } } } } } if (labPrefabResult != null) //预制描述 { labPrefabResult.enabled = (equipDic.Count == 0); } if (labWillResult != null) //描述 { labWillResult.enabled = (equipDic.Count != 0); } builder.Append(ConfigMng.Instance.GetUItext(270)); if (coinNum > 0) { builder.Append(ConfigMng.Instance.GetUItext(271)).Append(coinNum); } using (var e = itemList.GetEnumerator()) { while (e.MoveNext()) { ItemValue itemVal = e.Current.Value; builder.Append(" "); EquipmentInfo info = new EquipmentInfo(itemVal, EquipmentBelongTo.NONE); if (info != null) { builder.Append(info.ItemName).Append("*").Append(itemVal.count); } } } if (haveHighQualityEquip) { builder.Append(ConfigMng.Instance.GetUItext(272)); } return(builder.ToString()); }
public override void OnSingleClick(Mobile from) { List <EquipInfoAttribute> attrs = new List <EquipInfoAttribute>(); if (DisplayLootType) { if (LootType == LootType.Blessed) { attrs.Add(new EquipInfoAttribute(1038021)); // blessed } else if (LootType == LootType.Cursed) { attrs.Add(new EquipInfoAttribute(1049643)); // cursed } } #region Factions if (m_FactionState != null) { attrs.Add(new EquipInfoAttribute(1041350)); // faction item } #endregion if (m_Quality == ArmorQuality.Exceptional) { attrs.Add(new EquipInfoAttribute(1018305 - (int)m_Quality)); } if (m_Identified || from.AccessLevel >= AccessLevel.GameMaster) { if (m_Durability != ArmorDurabilityLevel.Regular) { attrs.Add(new EquipInfoAttribute(1038000 + (int)m_Durability)); } if (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability) { attrs.Add(new EquipInfoAttribute(1038005 + (int)m_Protection)); } } else if (m_Durability != ArmorDurabilityLevel.Regular || (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability)) { attrs.Add(new EquipInfoAttribute(1038000)); // Unidentified } int number; if (Name == null) { number = LabelNumber; } else { LabelTo(from, Name); number = 1041000; } if (attrs.Count == 0 && Crafter == null && Name != null) { return; } EquipmentInfo eqInfo = new EquipmentInfo(number, m_Crafter, false, attrs.ToArray()); from.Send(new DisplayEquipmentInfo(this, eqInfo)); }
void OnServerCharacterCreate(NetworkMessage netMsg) { print("OnServerCharacterCreate " + netMsg.conn); CharacterCreateMsg message = netMsg.ReadMessage <CharacterCreateMsg>(); // only while in lobby (aka after handshake and not ingame) if (lobby.ContainsKey(netMsg.conn)) { // allowed character name? if (IsAllowedCharacterName(message.name)) { // not existant yet? string account = lobby[netMsg.conn]; if (!Database.CharacterExists(message.name)) { // not too may characters created yet? if (Database.CharactersForAccount(account).Count < characterLimit) { // valid class index? List <Player> classes = GetPlayerClasses(); if (0 <= message.classIndex && message.classIndex < classes.Count) { // create new character based on the prefab. // -> we also assign default items and equipment for new characters // -> skills are handled in Database.CharacterLoad every time. if we // add new ones to a prefab, all existing players should get them // (instantiate temporary player) print("creating character: " + message.name + " " + message.classIndex); Player prefab = GameObject.Instantiate(classes[message.classIndex]).GetComponent <Player>(); prefab.name = message.name; prefab.account = account; prefab.className = classes[message.classIndex].name; prefab.transform.position = GetStartPositionFor(prefab.className).position; for (int i = 0; i < prefab.inventorySize; ++i) { // add empty slot or default item if any prefab.inventory.Add(i < prefab.defaultItems.Length ? new ItemSlot(new Item(prefab.defaultItems[i])) : new ItemSlot()); } for (int i = 0; i < prefab.equipmentInfo.Length; ++i) { // add empty slot or default item if any EquipmentInfo info = prefab.equipmentInfo[i]; prefab.equipment.Add(info.defaultItem != null ? new ItemSlot(new Item(info.defaultItem)) : new ItemSlot()); } prefab.health = prefab.healthMax; // after equipment in case of boni prefab.mana = prefab.manaMax; // after equipment in case of boni // addon system hooks Utils.InvokeMany(typeof(NetworkManagerMMO), this, "OnServerCharacterCreate_", message, prefab); // save the player Database.CharacterSave(prefab, false); GameObject.Destroy(prefab.gameObject); // send available characters list again, causing // the client to switch to the character // selection scene again CharactersAvailableMsg reply = MakeCharactersAvailableMessage(account); netMsg.conn.Send(CharactersAvailableMsg.MsgId, reply); } else { print("character invalid class: " + message.classIndex); ClientSendPopup(netMsg.conn, "character invalid class", false); } } else { print("character limit reached: " + message.name); ClientSendPopup(netMsg.conn, "character limit reached", false); } } else { print("character name already exists: " + message.name); ClientSendPopup(netMsg.conn, "name already exists", false); } } else { print("character name not allowed: " + message.name); ClientSendPopup(netMsg.conn, "character name not allowed", false); } } else { print("CharacterCreate: not in lobby"); ClientSendPopup(netMsg.conn, "CharacterCreate: not in lobby", true); } }
public void SetEquipInfo(EquipmentInfo data, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { _equipInfo = data; _showDelay = showDelay; _type = type; }
void ShowItemInfo() { lackEquipList.Clear(); enough = true; enoughMaterial = true; enoughCoin = true; EquipmentInfo equip = GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo == null?null:new EquipmentInfo(GameCenter.equipmentTrainingMng.CurSelectEquipmentInfo, EquipmentBelongTo.PREVIEW); if (curItemUI != null) { curItemUI.FillInfo(equip); } if (equip != null) { if (curAttr != null) { curAttr.text = GameHelper.GetAttributeNameAndValue(equip.AttributePairList); } OrangeRefineRef orangeRefineRef = ConfigMng.Instance.GetOrangeRefineRefByEid(equip.EID); if (orangeRefineRef != null) { EquipmentInfo info = new EquipmentInfo(equip, orangeRefineRef.end_item); if (targetItemUI != null) { targetItemUI.FillInfo(info); } if (targetAttr != null) { targetAttr.text = GameHelper.GetAttributeNameAndValue(info.AttributePairList); } EquipmentInfo lackEquip = null; System.Text.StringBuilder builder = new System.Text.StringBuilder(); for (int i = 0, max = orangeRefineRef.materialItem.Count; i < max; i++) { string str = GameHelper.GetStringWithBagNumber(orangeRefineRef.materialItem[i], out enough, out orangeCostItem); builder.Append(str); if (enough == false) { enoughMaterial = enough; } builder.Append("\n"); } ItemValue coinItem = new ItemValue(5, (int)orangeRefineRef.coin); string coinStr = GameHelper.GetStringWithBagNumber(coinItem, out enoughCoin, out lackEquip); builder.Append(coinStr); if (lackEquip != null) { lackEquipList.Add(lackEquip); } if (labStone != null) { labStone.text = builder.ToString(); } } else { // GameCenter.messageMng.AddClientMsg("选中装备无法橙炼!"); } GameCenter.equipmentTrainingMng.quickBuyList = lackEquipList; } else { if (targetItemUI != null) { targetItemUI.FillInfo(null); } if (curAttr != null) { curAttr.text = string.Empty; } if (targetAttr != null) { targetAttr.text = string.Empty; } if (labStone != null) { labStone.text = string.Empty; } } }
public void SetEquipInfo(int equipId, ShowDescriptionType type = ShowDescriptionType.longPress, float showDelay = 0.15f) { EquipmentInfo info = new EquipmentInfo(0, equipId, 0); SetEquipInfo(info, type, showDelay); }
public void ProcessRequest(HttpContext context) { context.Response.ContentEncoding = Encoding.UTF8; context.Response.ContentType = "application/json"; string type = context.Request.QueryString["Type"]; string code = context.Request.QueryString["Code"]; string batchNumber = ""; switch (type) { case "CP": ProducePlanBLL bll = BLLFactory.CreateBLL <ProducePlanBLL>(); ProductInfo result = bll.GetPNameByIDBatchNumber(code); if (result == null) { result = new ProductInfo(); if (result != null) { result.PID = "none"; } } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(result)); break; case "CP2": ProducePlanBLL bllGoodInfo = BLLFactory.CreateBLL <ProducePlanBLL>(); GoodInfo resultGoodInfo = bllGoodInfo.GetGoodInfoByBatchNumber(code); if (resultGoodInfo == null) { resultGoodInfo = new GoodInfo(); if (resultGoodInfo != null) { resultGoodInfo.PID = "none"; } } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(resultGoodInfo)); break; case "CB": EquipmentBLL bll2 = BLLFactory.CreateBLL <EquipmentBLL>(); EquipmentInfo result2 = bll2.GetInfoByBarCode(code); if (result2 == null) { result2 = new EquipmentInfo(); if (result2 != null) { result2.PID = "none"; } } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(result2)); break; case "GX": //根据工位条码获取加工工序 ProcessInfoBLL bll3 = BLLFactory.CreateBLL <ProcessInfoBLL>(); Manage.Entity.MES.ProcessInfo result3 = bll3.GetInfoByWS(code); if (result3 == null) { result3 = new Manage.Entity.MES.ProcessInfo(); if (result3 != null) { result3.PID = "none"; } } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(result3)); break; case "GX2": ProcessInfoBLL bll4 = BLLFactory.CreateBLL <ProcessInfoBLL>(); batchNumber = context.Request.QueryString["BatchNumber"]; Manage.Entity.MES.ProcessInfo result4 = bll4.GetInfoByBarCodeAndBatchNumber(code, batchNumber); if (result4 == null) { result4 = new Manage.Entity.MES.ProcessInfo(); if (result4 != null) { result4.PID = "none"; } } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(result4)); break; case "PP": ProducePlanBLL ppbll = BLLFactory.CreateBLL <ProducePlanBLL>(); SupplyInfoBLL sibll = BLLFactory.CreateBLL <SupplyInfoBLL>(); string id = context.Request.QueryString["id"]; SupplyInfo siresult = ppbll.GetProducePlanInfoByID(id); if (siresult == null) { siresult = new SupplyInfo(); if (siresult != null) { siresult.PID = "none"; } } else { siresult.Details = sibll.GetMaterialListByBOM(siresult.ProductionID); } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(siresult)); break; case "ZJ": QualityCheckBLL qcBll = BLLFactory.CreateBLL <QualityCheckBLL>(); batchNumber = context.Request.QueryString["BatchNumber"]; QualityCheckInfo qualityCheckInfo = qcBll.GetPDInfo(batchNumber); if (qualityCheckInfo == null) { qualityCheckInfo = new QualityCheckInfo(); qualityCheckInfo.ID = "none"; } context.Response.Write(LAF.Common.Serialization.JsonConvertHelper.GetSerializes(qualityCheckInfo)); break; default: break; } }
/// <summary> /// 结算数据 /// </summary> /// <param name="_rankInfo"></param> /// <param name="_rank"></param> public void SetSettlementData(st.net.NetBase.mountain_flames_win _rankInfo, int _rank, bool _isSameCamp, int _figntState) { if (_isSameCamp)//跟我一个阵营 { if (rankLab != null) { rankLab.text = "[00FF00]" + _rank; } if (nameLab != null) { nameLab.text = "[00FF00]" + _rankInfo.name; } if (jifenLab != null) { jifenLab.text = "[00FF00]" + _rankInfo.amount_score; } if (hitLab != null) { hitLab.text = "[00FF00]" + _rankInfo.damage; } if (attackLab != null) { attackLab.text = "[00FF00]" + _rankInfo.kill_num; } BattleFieldRef BattleFieldRef = ConfigMng.Instance.GetBattleFieldRefByScore(_rankInfo.amount_score); if (BattleFieldRef != null && rewardLevSp != null) { rewardLevSp.spriteName = BattleFieldRef.icon; rewardLevSp.MakePixelPerfect(); } if (rewardDes != null) { BattleSettlementBonusRef battleSettle = ConfigMng.Instance.GetBattleSettlementBonusRef(_figntState); if (battleSettle != null) { StringBuilder str = new StringBuilder(); for (int i = 0, max = battleSettle.rewardList.Count; i < max; i++) { EquipmentInfo eqinfo = new EquipmentInfo(battleSettle.rewardList[i].eid, EquipmentBelongTo.PREVIEW); str.Append(eqinfo.ItemName).Append("x").Append(battleSettle.rewardList[i].count).Append(" "); } rewardDes.text = "[00FF00]" + str.ToString(); } } } else { int id = 3;//不跟我同一阵营,胜败相反 if (_figntState == 1) { id = 2; } if (_figntState == 2) { id = 1; } if (rankLab != null) { rankLab.text = "[F26354]" + _rank; } if (nameLab != null) { nameLab.text = "[F26354]" + _rankInfo.name; } if (jifenLab != null) { jifenLab.text = "[F26354]" + _rankInfo.amount_score; } if (hitLab != null) { hitLab.text = "[F26354]" + _rankInfo.damage; } if (attackLab != null) { attackLab.text = "[F26354]" + _rankInfo.kill_num; } BattleFieldRef BattleFieldRef = ConfigMng.Instance.GetBattleFieldRefByScore(_rankInfo.amount_score); if (BattleFieldRef != null && rewardLevSp != null) { rewardLevSp.spriteName = BattleFieldRef.icon; rewardLevSp.MakePixelPerfect(); } if (rewardDes != null) { BattleSettlementBonusRef battleSettle = ConfigMng.Instance.GetBattleSettlementBonusRef(id); if (battleSettle != null) { StringBuilder str = new StringBuilder(); for (int i = 0, max = battleSettle.rewardList.Count; i < max; i++) { EquipmentInfo eqinfo = new EquipmentInfo(battleSettle.rewardList[i].eid, EquipmentBelongTo.PREVIEW); str.Append(eqinfo.ItemName).Append("x").Append(battleSettle.rewardList[i].count).Append(" "); } rewardDes.text = "[F26354]" + str.ToString(); } } } }
//-------------------------------------------------------------------------------------[] private void DoUpdateEquipments(EquipmentInfo equipments) { UpdateWeaponInfo(CombatModelBuilder.CreateWeaponInfos(equipments)); }
/// <summary> /// 构造 by吴江 /// </summary> /// <param name="_actorData"></param> public OtherPlayerInfo(st.net.NetBase.scene_ply _info, List <int> _equipList, bool _isInFight) { serverData = new OtherPlayerData(_info); if (_equipList != null && _equipList.Count > 0) { serverData.equipTypeList.AddRange(_equipList); } serverData.isInFight = _isInFight; IsAlive = serverData.baseValueDic.ContainsKey(ActorBaseTag.CurHP)?(serverData.baseValueDic[ActorBaseTag.CurHP] != 0):true; //其他玩家是否死亡和复活 List <int> defaultEquipList = RefData == null?new List <int>():RefData.defaultEquipList; foreach (var item in defaultEquipList) { EquipmentInfo eq = new EquipmentInfo(item, EquipmentBelongTo.EQUIP); if (defaultDictionary.ContainsKey(eq.Slot)) { GameSys.LogError(ConfigMng.Instance.GetUItext(213)); } defaultDictionary[eq.Slot] = eq; } RefineRef rr = ConfigMng.Instance.GetRefineRef(_info.magic_weapon_id, _info.magic_strength_lev, _info.magic_strength_star); if (rr != null) { serverData.magicWeaponID = rr.model; if (serverData.equipTypeList.Contains(serverData.magicWeaponID)) { if (!GameCenter.systemSettingMng.OtherPlayerMagic) { serverData.equipTypeList.Remove(serverData.magicWeaponID); } } else { if (GameCenter.systemSettingMng.OtherPlayerMagic) { serverData.equipTypeList.Add(serverData.magicWeaponID); } } } WingRef data = null; if (_info.wing_id > 0) { data = ConfigMng.Instance.GetWingRef(_info.wing_id, _info.wing_lev); } if (data != null) { serverData.wingID = data.itemui; if (serverData.equipTypeList.Contains(serverData.wingID)) { if (!GameCenter.systemSettingMng.OtherPlayerWing) { serverData.equipTypeList.Remove(serverData.wingID); } } else { if (GameCenter.systemSettingMng.OtherPlayerWing) { serverData.equipTypeList.Add(serverData.wingID); } } } ProcessServerData(serverData); if (_info.ride_type > 0) { curMountInfo = new MountInfo(_info, this); } }