Jump to content

bananaspx

Members
  • Posts

    8
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About bananaspx

Profile Information

  • Gender
    Male
  • Country
    Lithuania

bananaspx's Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. Hi guys can help me? How fix this code? I saw on forum another code, but he doesn't work. I him liitle bit fixed but still don't work. What i should to do? I tried add if (_isCrystal) or if (_bisBlessed) but nothing. what i need to do for fix max enchant? package net.sf.l2j.gameserver.network.clientpackets; import java.util.HashMap; import java.util.Map; import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.item.kind.Item; import net.sf.l2j.gameserver.model.item.kind.Weapon; import net.sf.l2j.gameserver.model.item.type.CrystalType; import net.sf.l2j.gameserver.model.item.type.WeaponType; public abstract class AbstractEnchantPacket extends L2GameClientPacket { public static final Map<Integer, EnchantScroll> _scrolls = new HashMap<>(); public static final class EnchantScroll { protected final boolean _isWeapon; protected final CrystalType _grade; private final boolean _isBlessed; private final boolean _isCrystal; public EnchantScroll(boolean wep, boolean bless, boolean crystal, CrystalType type) { _isWeapon = wep; _grade = type; _isBlessed = bless; _isCrystal = crystal; } /** * @param enchantItem : The item to enchant. * @return true if support item can be used for this item */ public final boolean isValid(ItemInstance enchantItem) { if (enchantItem == null) return false; // checking scroll type and configured maximum enchant level switch (enchantItem.getItem().getType2()) { case Item.TYPE2_WEAPON: if (_isWeapon || (Config.ENCHANT_MAX_WEAPON > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_WEAPON)) return false; break; if (isWeapon) if (_isWeapon || (Config.ENCHANT_MAX_BLESSED_WEAPON > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_BLESSED_WEAPON)) return false; break; if (_isWeapon || (Config.ENCHANT_MAX_CRYSTAL_WEAPON > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_CRYSTAL_WEAPON)) return false; break; case Item.TYPE2_SHIELD_ARMOR: if (_isWeapon || (Config.ENCHANT_MAX_ARMOR > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_ARMOR)) return false; break; if (_isWeapon || (Config.ENCHANT_MAX_BLESSED_ARMOR > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_BLESSED_ARMOR)) return false; break; if (_isWeapon || (Config.ENCHANT_MAX_CRYSTAL_ARMOR > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_CRYSTAL_ARMOR)) return false; break; case Item.TYPE2_ACCESSORY: if (_isWeapon || (Config.ENCHANT_MAX_JEWELS > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_JEWELS)) return false; break; if (_isWeapon || (Config.ENCHANT_MAX_BLESSED_JEWELS > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_BLESSED_JEWELS)) return false; break; if (_isWeapon || (Config.ENCHANT_MAX_CRYSTAL_JEWELS > 0 && enchantItem.getEnchantLevel() >= Config.ENCHANT_MAX_CRYSTAL_JEWELS)) return false; break; default: return false; }
  2. anyone have nexus event engine for Intelude?
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock