Examples of ItemInstance


Examples of lineage2.gameserver.model.items.ItemInstance

    double mpGain = player.calcStat(Stats.MANAHEAL_EFFECTIVNESS, 100., target, null);
    double critPerc = 2 * player.calcStat(Stats.CRITICAL_DAMAGE, target, null);
    double critStatic = player.calcStat(Stats.CRITICAL_DAMAGE_STATIC, target, null);
    double mCritDmg = player.calcStat(Stats.MCRITICAL_DAMAGE, target, null);
    double blowRate = player.calcStat(Stats.FATALBLOW_RATE, target, null);
    ItemInstance shld = player.getSecondaryWeaponInstance();
    boolean shield = (shld != null) && (shld.getItemType() == WeaponType.NONE);
    double shieldDef = shield ? player.calcStat(Stats.SHIELD_DEFENCE, player.getTemplate().getBaseShldDef(), target, null) : 0.;
    double shieldRate = shield ? player.calcStat(Stats.SHIELD_RATE, target, null) : 0.;
    double xpRate = player.getRateExp();
    double spRate = player.getRateSp();
    double dropRate = player.getRateItems();
View Full Code Here

Examples of lineage2.gameserver.model.items.ItemInstance

    _money = player.getAdena();
    _castle = castleId;
    _procureList = ResidenceHolder.getInstance().getResidence(Castle.class, _castle).getCropProcure(0);
    for (CropProcure c : _procureList)
    {
      ItemInstance item = player.getInventory().getItemByItemId(c.getId());
      if (item != null && c.getAmount() > 0)
        _sellList.put(item, c.getAmount());
    }
  }
View Full Code Here

Examples of lineage2.gameserver.model.items.ItemInstance

        OlympiadHistoryManager.getInstance().saveHistory(h);
      }
    }
    for (Player player : winnerTeam.getPlayers())
    {
      ItemInstance item = player.getInventory().addItem(Config.ALT_OLY_BATTLE_REWARD_ITEM, getType().getReward());
      player.sendPacket(SystemMessage2.obtainItems(item.getItemId(), getType().getReward(), 0));
      player.sendChanges();
    }
    List<Player> teamsPlayers = new ArrayList<>();
    teamsPlayers.addAll(winnerTeam.getPlayers());
    teamsPlayers.addAll(looseTeam.getPlayers());
View Full Code Here

Examples of lineage2.gameserver.model.items.ItemInstance

          Inventory inv = ((Playable) activeChar).getInventory();
          if (inv == null)
          {
            inv = player.getInventory();
          }
          ItemInstance requiredItems = inv.getItemByItemId(_itemConsumeId[i]);
          if ((requiredItems == null) || (requiredItems.getCount() < _itemConsume[i]))
          {
            if (activeChar == player)
            {
              player.sendPacket(isHandler() ? SystemMsg.INCORRECT_ITEM_COUNT : SystemMsg.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
            }
View Full Code Here

Examples of lineage2.gameserver.model.items.ItemInstance

  @Override
  public void onBypassFeedback(Player player, String command)
  {
    if (command.startsWith("open_gate"))
    {
      ItemInstance hallsKey = player.getInventory().getItemByItemId(HALLS_KEY);
      if (hallsKey == null)
      {
        showHtmlFile(player, "Gatekeeper-no.htm");
      }
      else if (FourSepulchersManager.isAttackTime())
      {
        switch (getNpcId())
        {
          case 31929:
          case 31934:
          case 31939:
          case 31944:
            if (!FourSepulchersSpawn.isShadowAlive(getNpcId()))
            {
              FourSepulchersSpawn.spawnShadow(getNpcId());
            }
        }
        openNextDoor(getNpcId());
        if (player.getParty() != null)
        {
          for (Player mem : player.getParty().getPartyMembers())
          {
            hallsKey = mem.getInventory().getItemByItemId(HALLS_KEY);
            if (hallsKey != null)
            {
              Functions.removeItem(mem, HALLS_KEY, hallsKey.getCount());
            }
          }
        }
        else
        {
          Functions.removeItem(player, HALLS_KEY, hallsKey.getCount());
        }
      }
    }
    else
    {
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance

        }
      });
 
      ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("prefix", "The counter has the value ");
    structureInstance.setFieldValue("suffix", ". Good news");

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance

  public void execute(ActivityExecution execution) throws Exception {
    MessageInstance message;
   
    if (ioSpecification != null) {
      this.ioSpecification.initialize(execution);
      ItemInstance inputItem = (ItemInstance) execution.getVariable(this.ioSpecification.getFirstDataInputName());
      message = new MessageInstance(this.operation.getInMessage(), inputItem);
    } else {
      message = this.operation.getInMessage().createInstance();
    }
   
    execution.setVariable(CURRENT_MESSAGE, message);
   
    this.fillMessage(message, execution);
   
    MessageInstance receivedMessage = this.operation.sendMessage(message);

    execution.setVariable(CURRENT_MESSAGE, receivedMessage);

    if (ioSpecification != null) {
      String firstDataOutputName = this.ioSpecification.getFirstDataOutputName();
      if (firstDataOutputName != null) {
        ItemInstance outputItem = (ItemInstance) execution.getVariable(firstDataOutputName);
        outputItem.getStructureInstance().loadFrom(receivedMessage.getStructureInstance().toArray());
      }
    }
   
    this.returnMessage(receivedMessage, execution);
   
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance

        }
      });
   
    ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("newCounterValue", 23);

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance

        }
      });
 
      ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("prefix", "The counter has the value ");
    structureInstance.setFieldValue("suffix", ". Good news");

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance

        }
      });
   
    ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("newCounterValue", 23);

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.