コード例 #1
0
  @Override
  public PlayerAttribute getPlayerAttribute(Player player) {
    PlayerAttribute att = new PlayerAttribute();
    List<String> removeList = new ArrayList<String>();

    for (String collectId : player.getCollect().getInfos().keySet()) {
      try {
        CollectItem item = player.getCollect().getInfos().get(collectId);
        Q_collectBean collectBean =
            DataManager.getInstance().q_collectContainer.getMap().get(Integer.valueOf(collectId));

        if (CollectManager.getInstance().isActivity(item, collectBean)) {
          Q_buffBean buffBean =
              ManagerPool.dataManager.q_buffContainer.getMap().get(collectBean.getQ_buff_id());
          if (buffBean != null) att.add(PlayerAttribute.getPlayerAttribute(buffBean));
        }
      } catch (Exception e) {
        removeList.add(collectId);
      }
    }

    for (String key : removeList) {
      player.getCollect().getInfos().remove(key);
    }

    return att;
  }
コード例 #2
0
ファイル: Q_collectContainer.java プロジェクト: zyb2013/Polar
 public void load() {
   list = dao.select();
   Iterator<Q_collectBean> iter = list.iterator();
   while (iter.hasNext()) {
     Q_collectBean bean = (Q_collectBean) iter.next();
     map.put(bean.getQ_coll_id(), bean);
   }
 }