public static GoodsMode.GoodsType GetGoodsType(this PGoods goods) { //普通装备 if (goods.goodsId < GoodsMode.Instance.GoodsId && goods.GetPGoodsVo <SysEquipVo>().type == 0) { return(GoodsMode.GoodsType.Equip); } //宝石 else if (goods.goodsId > GoodsMode.Instance.GoodsId && goods.GetPGoodsVo <SysItemVo>().type == 3) { return(GoodsMode.GoodsType.Smelt); } //宠物:宠物 和宠物装备 else if ((goods.goodsId > GoodsMode.Instance.GoodsId && goods.GetPGoodsVo <SysItemVo>().type == 5) || (goods.goodsId < GoodsMode.Instance.GoodsId && goods.GetPGoodsVo <SysEquipVo>().type == 3)) { return(GoodsMode.GoodsType.Pet); } else { return(GoodsMode.GoodsType.Other); } }
/// <summary> /// 是否显示可装备的箭头提示 /// </summary> /// <param name="id">唯一Id</param> /// <returns></returns> public bool IsShowEquipTips(uint id) { PGoods goods = GetPGoodsById(id); if (goods != null && goods.goodsId < GoodsId) //装备 { SysEquipVo vo = goods.GetPGoodsVo <SysEquipVo>(); int fightPoint = GoodsMode.Instance.CalculateFightPoint(goods); //本装备的战斗力 int fightPoint1 = GoodsMode.Instance.GetFightPointByPos(vo.pos); //装备栏对应位置的战斗力 if (fightPoint > fightPoint1 && goods.IsJobCanEquip() && vo.GetLvl() <= MeVo.instance.Level) //战斗力 是否可装备(角色类型),等级 { return(true); } } return(false); }