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;
}
Powerful Spells Caster & Spiritual Healer
Web: lovespellsafrika.com
Phone: +27780802727
WhatsApp +27789121499
Email: bbaantu@gmail.com
Real Magic Spells | How To Get Back Ex-Boyfriend or Ex-Girlfriend.
Real Magic Spells for all purpose;
Now you can benefit through the use of spells like Love Spells, Money Spells, Talismans, Charms, Prayers, Curses and Chants. Magic Spells can be spell cast for many purposes.
Talismans and Charms work as powerful Ingredients. If you need any spiritual knowledge on the power of Spells and Magic you can always
Powerful Magic Rings
Love Spells
Casting of Simple and Effective Love Spells
Easy Love Spells
Spells for Attraction between two Lovers
Binding Love Spells
Get back Lost Lover Spells
Spells to Strengthen Love Relation
Lost Love Spells
Soul Mate Spells
Marriage Spell for a happy Married Life.
Retrieve a Lost Love Spells
Bring Back Your Love Spells
Gay Love Spells, Lesbian Love Spells
Anti-Love Spells, Divorce Spells, Break up Spells
How to Get Back Ex-Boyfriend, or Ex-Girlfriend
Casting Spells to Get Rid of Your Husband, Wife or Partner without Fights or them hating you
Magic Rings, Powerful Love Rings
Spells to stop a divorce
Voodoo Spells for Love
Love Return Spells
Money & Prosperity Spells
Phone: +27780802727
WhatsApp +27789121499
How to Cast Magic Money Spells
Lottery Spells or Lotto Spells
Voodoo Spells for Money
Black Magic Spell for Money
Protection & Banishing Spells
Black Magic Spells and Curses to Destroy Enemy or Evil People
Protection from Black Magic Spells and Curses
Dark Magic Spells
Voodoo Spells for Revenge
Spells to win court cases &legal matters
Healing spells for all purpose
Stroke
Diabetics
Lottery Spells
Phone: +27780802727
WhatsApp: +27789121499
Web: lovespellsafrika.com
Question
bananaspx
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?
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.