Esempio n. 1
0
 private void addItemData(int itemId, int num, int weight, int bindType) {
   if (weight <= 0 || itemId <= 0 || num <= 0) {
     return;
   }
   GoodsBase gb = GameContext.getGoodsApp().getGoodsBase(itemId);
   if (null == gb) {
     Log4jManager.CHECK.error(
         "LootGroup config error,goods not exist,groupId=" + this.groupId + " goodsId=" + itemId);
     Log4jManager.checkFail();
   }
   BindingType bt = this.getBindingType(itemId, bindType);
   this.groupList.add(new ItemData(itemId, num, weight, bt.getType()));
 }
Esempio n. 2
0
 private BindingType getBindingType(int goodsId, int bindType) {
   if (bindType == DEF_BIND_TYPE) {
     GoodsBase gb = GameContext.getGoodsApp().getGoodsBase(goodsId);
     return gb.getBindingType();
   }
   return BindingType.get(bindType);
 }