Example #1
0
 /**
  * 获取镶嵌的item
  *
  * @param roleGoods
  * @return
  */
 private List<GoodsEquRuneItem> getMosaicItem(RoleGoods roleGoods) {
   // 获得宝石镶嵌属性
   MosaicRune[] runes = roleGoods.getMosaicRune();
   if (null == runes || runes.length <= 0) {
     return null;
   }
   List<GoodsEquRuneItem> runeItemList = new ArrayList<GoodsEquRuneItem>();
   for (int index = 0; index < runes.length; index++) {
     MosaicRune rune = runes[index];
     if (null == rune) {
       continue;
     }
     int runeId = rune.getGoodsId();
     GoodsRune gb = GameContext.getGoodsApp().getGoodsTemplate(GoodsRune.class, runeId);
     if (null == gb) {
       continue;
     }
     GoodsEquRuneItem runeItem = new GoodsEquRuneItem();
     runeItem.setHole(rune.getHole());
     runeItem.setGoodsLiteItem(rune.getGoodsLiteItem());
     runeItem.setRuneName(gb.getName());
     runeItem.setAttriItems(rune.getAttriStrValueList());
     runeItemList.add(runeItem);
   }
   return runeItemList;
 }