Reduced ensoul array lengths.

This commit is contained in:
MobiusDevelopment 2019-04-01 00:43:40 +00:00
parent 5d4ed8942a
commit 0baae2ed06
10 changed files with 70 additions and 30 deletions

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2171,7 +2171,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2169,7 +2169,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2169,7 +2169,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2169,7 +2169,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}

View File

@ -174,8 +174,8 @@ public final class ItemInstance extends WorldObject
private final DropProtection _dropProtection = new DropProtection();
private final List<Options> _enchantOptions = new ArrayList<>();
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[3];
private final EnsoulOption[] _ensoulOptions = new EnsoulOption[2];
private final EnsoulOption[] _ensoulSpecialOptions = new EnsoulOption[1];
/**
* Constructor of the ItemInstance from the objectId and the itemId.
@ -2169,7 +2169,11 @@ public final class ItemInstance extends WorldObject
public void addSpecialAbility(EnsoulOption option, int position, int type, boolean updateInDB)
{
if ((position < 0) || (position > 2))
if ((type == 1) && ((position < 0) || (position > 1))) // two first slots
{
return;
}
if ((type == 2) && (position != 0)) // third slot
{
return;
}