Jump to content

masterchief

User
  • Content Count

    17
  • Joined

  • Last visited

  • Feedback

    0%

Community Reputation

6

4 Followers

About masterchief

  • Rank
    Только пришел

Контакты

Recent Profile Visitors

2326 profile views
  1. java.lang.NullPointerException at com.l2jserver.gameserver.model.actor.instance.L2ClassMasterInstance.getRequiredItems(L2ClassMasterInstance.java:526) at com.l2jserver.gameserver.model.actor.instance.L2ClassMasterInstance.showHtmlMenu(L2ClassMasterInstance.java:339) at com.l2jserver.gameserver.model.actor.instance.L2ClassMasterInstance.onBypassFeedback(L2ClassMasterInstance.java:79) at com.l2jserver.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:201) at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:69) at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:1140) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) npc classe master l2jmobius plz
  2. Название: L2J Unreal проект Добавил: masterchief Добавлен: 20 Jun 2015 Категория: Сборки Автор: masterchief Хроники: Goddess of Destruction Мы просим помощи для каждого испытания и размещение ошибок, ошибок и исправлений. Нажмите здесь, чтобы скачать файл
  3. Version обзор 64

    219 downloads

    Мы просим помощи для каждого испытания и размещение ошибок, ошибок и исправлений.

    Free

  4. equipe depois de eu colocar a mudança de linha : for ( ingridient: ingridients ) para : for ( ingridient AlchemyDataTemplate.AlchemyItem : ingridients ) apareceu erros imagem abaixo. Pastebin: http://pastebin.com/Gf2DkvsV
  5. AlchemyDataTemplate.java: package lineage2.gameserver.templates.item; import java.util.ArrayList; import java.util.List; public final class AlchemyDataTemplate { private final int _skillId; private final int _skillLevel; private final int _successRate; private final List<AlchemyItem> _ingridients = new ArrayList(); private final List<AlchemyItem> _onSuccessProducts = new ArrayList(); private final List<AlchemyItem> _onFailProducts = new ArrayList(); public AlchemyDataTemplate(int skillId, int skillLevel, int successRate) { _skillId = skillId; _skillLevel = skillLevel; _successRate = successRate; } public int getSkillId() { return _skillId; } public int getSkillLevel() { return _skillLevel; } public int getSuccessRate() { return _successRate; } public void addIngridient(AlchemyItem ingridient) { _ingridients.add(ingridient); } public AlchemyItem[] getIngridients() { return (AlchemyItem[])_ingridients.toArray(new AlchemyItem[_ingridients.size()]); } public void addOnSuccessProduct(AlchemyItem product) { _onSuccessProducts.add(product); } public AlchemyItem[] getOnSuccessProducts() { return (AlchemyItem[])_onSuccessProducts.toArray(new AlchemyItem[_onSuccessProducts.size()]); } public void addOnFailProduct(AlchemyItem product) { _onFailProducts.add(product); } public AlchemyItem[] getOnFailProducts() { return (AlchemyItem[])_onFailProducts.toArray(new AlchemyItem[_onFailProducts.size()]); } public static class AlchemyItem { private final int _id; private final int _count; public AlchemyItem(int id, int count) { _id = id; _count = count; } public int getId() { return _id; } public long getCount() { return _count; } } }
  6. We solved this, but others appeared. Thank you for your help. if it does not account to correct others post here again.
  7. has some other part of java that you need to identify the error?
  8. извините ошибки Я использую Google переводчик. б редакция: Мобиус база l2p нужна помощь со следующей ошибкой: Java код где эта ошибка: package lineage2.gameserver.network.l2.c2s; import gnu.trove.iterator.TIntLongIterator; import gnu.trove.map.TIntLongMap; import gnu.trove.map.hash.TIntLongHashMap; import lineage2.commons.util.Rnd; import lineage2.gameserver.data.xml.holder.AlchemyDataHolder; import lineage2.gameserver.tables.SkillTable; import lineage2.gameserver.model.Player; import lineage2.gameserver.model.Skill; import lineage2.gameserver.model.items.Inventory; import lineage2.gameserver.model.items.ItemInstance; import lineage2.gameserver.network.GameClient; import lineage2.gameserver.network.serverpackets.components.SystemMsg; import lineage2.gameserver.network.serverpackets.ExAlchemyConversion; import lineage2.gameserver.network.serverpackets.SystemMessage; import lineage2.gameserver.templates.item.AlchemyDataTemplate; import lineage2.gameserver.templates.item.AlchemyDataTemplate.AlchemyItem; import lineage2.gameserver.utils.ItemFunctions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class RequestAlchemyConversion extends L2GameClientPacket { private static final Logger _log = LoggerFactory.getLogger(RequestAlchemyConversion.class); private int _count; private int _skillId; private int _skillLevel; protected void readImpl() { _count = readD(); readH(); _skillId = readD(); _skillLevel = readD(); } protected void runImpl() { Player activeChar = ((GameClient)getClient()).getActiveChar(); if (activeChar == null) { return; } if (_count <= 0) { activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } if (activeChar.isActionsDisabled()) { activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } if (activeChar.isInCombat()) { activeChar.sendPacket(SystemMsg.YOU_CANNOT_USE_ALCHEMY_DURING_BATTLE); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } if ((activeChar.isInStoreMode()) || (activeChar.isInTrade())) { activeChar.sendPacket(SystemMsg.YOU_CANNOT_USE_ALCHEMY_WHILE_TRADING_OR_USING_A_PRIVATE_STORE_OR_SHOP); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } if (activeChar.isDead()) { activeChar.sendPacket(SystemMsg.YOU_CANNOT_USE_ALCHEMY_WHILE_DEAD); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } if (activeChar.isMovementDisabled()) { activeChar.sendPacket(SystemMsg.YOU_CANNOT_USE_ALCHEMY_WHILE_IMMOBILE); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } Skill skill = SkillHolder.getInstance().getSkill(_skillId, _skillLevel); if (skill == null) { _log.warn(getClass().getSimpleName() + ": Error while alchemy: Cannot find alchemy skill[" + _skillId + "-" + _skillLevel + "]!"); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } AlchemyDataTemplate data = AlchemyDataHolder.getInstance().getData(skill); if (data == null) { _log.warn(getClass().getSimpleName() + ": Error while alchemy: Cannot find alchemy data[" + _skillId + "-" + _skillLevel + "]!"); activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } AlchemyDataTemplate.AlchemyItem[] ingridients = data.getIngridients(); AlchemyDataTemplate.AlchemyItem[] onSuccessProducts = data.getOnSuccessProducts(); AlchemyDataTemplate.AlchemyItem[] onFailProducts = data.getOnFailProducts(); TIntLongMap deletedItems = new TIntLongHashMap(); TIntLongMap addedItems = new TIntLongHashMap(); int convensionCount = _count; Inventory inventory = activeChar.getInventory(); inventory.writeLock(); AlchemyDataTemplate.AlchemyItem ingridient; long count; try { for (AlchemyDataTemplate.AlchemyItem ingridient : ingridients) { ItemInstance item = inventory.getItemByItemId(ingridient.getId()); if ((item == null) || (item.getCount() < ingridient.getCount())) { activeChar.sendPacket(ExAlchemyConversion.FAIL); return; } convensionCount = Math.min(convensionCount, (int)Math.floor(item.getCount() / ingridient.getCount())); } for (ingridient : ingridients) { count = ingridient.getCount() * convensionCount; if (inventory.destroyItemByItemId(ingridient.getId(), count)) { long deleted = deletedItems.get(ingridient.getId()); deletedItems.put(ingridient.getId(), deleted + count); } } } finally { inventory.writeUnlock(); } int successCount = 0; int failCount = 0; for (int i = 0; i < convensionCount; i++) { if (Rnd.chance(data.getSuccessRate())) successCount++; else failCount++; } AlchemyDataTemplate.AlchemyItem[] arrayOfAlchemyItem2; if (successCount > 0) { arrayOfAlchemyItem2 = onSuccessProducts; ingridient = arrayOfAlchemyItem2.length; for (count = 0; count < ingridient; count++) { AlchemyDataTemplate.AlchemyItem product = arrayOfAlchemyItem2[count]; long count = product.getCount() * successCount; long deleted = deletedItems.get(product.getId()); if (deleted > 0L) { deletedItems.put(product.getId(), Math.max(0L, deleted - count)); long added = count - deleted; if (added > 0L) addedItems.put(product.getId(), addedItems.get(product.getId()) + added); } else { addedItems.put(product.getId(), addedItems.get(product.getId()) + count); } } } if (failCount > 0) { arrayOfAlchemyItem2 = onFailProducts; ingridient = arrayOfAlchemyItem2.length; for (count = 0; count < ingridient; count++) { AlchemyDataTemplate.AlchemyItem product = arrayOfAlchemyItem2[count]; long count = product.getCount() * failCount; long deleted = deletedItems.get(product.getId()); if (deleted > 0L) { deletedItems.put(product.getId(), Math.max(0L, deleted - count)); long added = count - deleted; if (added > 0L) addedItems.put(product.getId(), addedItems.get(product.getId()) + added); } else { addedItems.put(product.getId(), addedItems.get(product.getId()) + count); } } } for (TIntLongIterator iterator = deletedItems.iterator(); iterator.hasNext(); ) { iterator.advance(); long count = iterator.value(); if (count > 0L) { activeChar.sendPacket(SystemMessagePacket.removeItems(iterator.key(), count)); } } for (TIntLongIterator iterator = addedItems.iterator(); iterator.hasNext(); ) { iterator.advance(); long count = iterator.value(); if (count > 0L) { ItemFunctions.addItem(activeChar, iterator.key(), count, true); } } if ((successCount == 0) && (failCount == 0)) activeChar.sendPacket(ExAlchemyConversion.FAIL); else activeChar.sendPacket(new ExAlchemyConversion(successCount, failCount)); } }
×
×
  • Create New...