|
@@ -27,7 +27,6 @@ import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
|
|
import net.sf.l2j.gameserver.templates.item.L2Armor;
|
|
import net.sf.l2j.gameserver.templates.item.L2Armor;
|
|
import net.sf.l2j.gameserver.templates.item.L2Item;
|
|
import net.sf.l2j.gameserver.templates.item.L2Item;
|
|
import net.sf.l2j.gameserver.templates.item.L2Weapon;
|
|
import net.sf.l2j.gameserver.templates.item.L2Weapon;
|
|
-import net.sf.l2j.gameserver.templates.item.L2WeaponType;
|
|
|
|
|
|
|
|
public abstract class AbstractRefinePacket extends L2GameClientPacket
|
|
public abstract class AbstractRefinePacket extends L2GameClientPacket
|
|
{
|
|
{
|
|
@@ -257,15 +256,29 @@ public abstract class AbstractRefinePacket extends L2GameClientPacket
|
|
return false;
|
|
return false;
|
|
if (item.getItem().getCrystalType() < L2Item.CRYSTAL_C)
|
|
if (item.getItem().getCrystalType() < L2Item.CRYSTAL_C)
|
|
return false;
|
|
return false;
|
|
- if (item.getItem().getItemType() == L2WeaponType.ROD)
|
|
|
|
- return false;
|
|
|
|
|
|
|
|
// Source item can be equipped or in inventory
|
|
// Source item can be equipped or in inventory
|
|
- if (item.getLocation() != L2ItemInstance.ItemLocation.INVENTORY
|
|
|
|
- && item.getLocation() != L2ItemInstance.ItemLocation.PAPERDOLL)
|
|
|
|
- return false;
|
|
|
|
|
|
+ switch (item.getLocation())
|
|
|
|
+ {
|
|
|
|
+ case INVENTORY:
|
|
|
|
+ case PAPERDOLL:
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
|
|
- if (item.getItem() instanceof L2Armor)
|
|
|
|
|
|
+ if (item.getItem() instanceof L2Weapon)
|
|
|
|
+ {
|
|
|
|
+ switch (((L2Weapon)item.getItem()).getItemType())
|
|
|
|
+ {
|
|
|
|
+ case NONE: //shields
|
|
|
|
+ case ROD:
|
|
|
|
+ return false;
|
|
|
|
+ default:
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else if (item.getItem() instanceof L2Armor)
|
|
{
|
|
{
|
|
// only accessories can be augmented
|
|
// only accessories can be augmented
|
|
switch (item.getItem().getBodyPart())
|
|
switch (item.getItem().getBodyPart())
|
|
@@ -278,6 +291,8 @@ public abstract class AbstractRefinePacket extends L2GameClientPacket
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ return false; // neither weapon nor armor ?
|
|
|
|
|
|
// blacklist check
|
|
// blacklist check
|
|
if (Arrays.binarySearch(Config.AUGMENTATION_BLACKLIST, item.getItemId()) >= 0)
|
|
if (Arrays.binarySearch(Config.AUGMENTATION_BLACKLIST, item.getItemId()) >= 0)
|