Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Creature.sendPacket()


      activeChar.sendActionFailed();
      return;
    }
    if (activeChar.isFishing())
    {
      activeChar.sendPacket(SystemMsg.YOU_CANNOT_DO_THAT_WHILE_FISHING_);
      return;
    }
    RecipeTemplate recipe = RecipeHolder.getInstance().getRecipeByRecipeId(_recipeId);
    if ((recipe == null) || (recipe.getMaterials().length == 0))
    {
View Full Code Here


      return;
    }
    RecipeTemplate recipe = RecipeHolder.getInstance().getRecipeByRecipeId(_recipeId);
    if ((recipe == null) || (recipe.getMaterials().length == 0))
    {
      activeChar.sendPacket(SystemMsg.THE_RECIPE_IS_INCORRECT);
      return;
    }
    if (activeChar.getCurrentMp() < recipe.getMpConsume())
    {
      activeChar.sendPacket(SystemMsg.NOT_ENOUGH_MP, new RecipeItemMakeInfo(activeChar, recipe, 0));
View Full Code Here

      activeChar.sendPacket(SystemMsg.THE_RECIPE_IS_INCORRECT);
      return;
    }
    if (activeChar.getCurrentMp() < recipe.getMpConsume())
    {
      activeChar.sendPacket(SystemMsg.NOT_ENOUGH_MP, new RecipeItemMakeInfo(activeChar, recipe, 0));
      return;
    }
    if (!activeChar.findRecipe(_recipeId))
    {
      activeChar.sendPacket(SystemMsg.PLEASE_REGISTER_A_RECIPE, ActionFail.STATIC);
View Full Code Here

      activeChar.sendPacket(SystemMsg.NOT_ENOUGH_MP, new RecipeItemMakeInfo(activeChar, recipe, 0));
      return;
    }
    if (!activeChar.findRecipe(_recipeId))
    {
      activeChar.sendPacket(SystemMsg.PLEASE_REGISTER_A_RECIPE, ActionFail.STATIC);
      return;
    }
    activeChar.getInventory().writeLock();
    try
    {
View Full Code Here

          RecipeTemplate rp = RecipeHolder.getInstance().getRecipeByRecipeItem(material.getItemId());
          if (activeChar.hasRecipe(rp))
          {
            continue;
          }
          activeChar.sendPacket(SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_MATERIALS_TO_PERFORM_THAT_ACTION, new RecipeItemMakeInfo(activeChar, recipe, 0));
          return;
        }
        ItemInstance item = activeChar.getInventory().getItemByItemId(material.getItemId());
        if ((item == null) || (item.getCount() < material.getCount()))
        {
View Full Code Here

          return;
        }
        ItemInstance item = activeChar.getInventory().getItemByItemId(material.getItemId());
        if ((item == null) || (item.getCount() < material.getCount()))
        {
          activeChar.sendPacket(SystemMsg.YOU_DO_NOT_HAVE_ENOUGH_MATERIALS_TO_PERFORM_THAT_ACTION, new RecipeItemMakeInfo(activeChar, recipe, 0));
          return;
        }
      }
      for (RecipeComponent material : materials)
      {
View Full Code Here

        {
          if (!activeChar.getInventory().destroyItemByItemId(material.getItemId(), material.getCount()))
          {
            continue;
          }
          activeChar.sendPacket(SystemMessage2.removeItems(material.getItemId(), material.getCount()));
        }
      }
    }
    finally
    {
View Full Code Here

      ItemFunctions.addItem(activeChar, itemId, itemsCount, true);
      success = 1;
    }
    else
    {
      activeChar.sendPacket(new SystemMessage(SystemMessage.S1_MANUFACTURING_FAILURE).addItemName(itemId));
    }
    activeChar.sendPacket(new RecipeItemMakeInfo(activeChar, recipe, success));
  }
}
View Full Code Here

    }
    else
    {
      activeChar.sendPacket(new SystemMessage(SystemMessage.S1_MANUFACTURING_FAILURE).addItemName(itemId));
    }
    activeChar.sendPacket(new RecipeItemMakeInfo(activeChar, recipe, success));
  }
}
View Full Code Here

    {
      return;
    }
    if (!isValidPlayer(player))
    {
      player.sendPacket(ExPutEnchantTargetItemResult.FAIL);
      player.setEnchantScroll(null);
      return;
    }
    PcInventory inventory = player.getInventory();
    ItemInstance itemToEnchant = inventory.getItemByObjectId(_objectId);
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.