Use ClassId getId instead of ordinal.
This commit is contained in:
@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
||||
}
|
||||
tempMap.clear();
|
||||
Arrays.sort(array);
|
||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
||||
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||
}
|
||||
|
||||
// Race specific skills from Fishing and Transformation skill trees.
|
||||
@ -1681,7 +1681,7 @@ public class SkillTreesData implements IXmlReader
|
||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
||||
|
||||
if (Arrays.binarySearch(_skillsByClassIdHashCodes.get(player.getClassId().ordinal()), hashCode) >= 0)
|
||||
if (Arrays.binarySearch(_skillsByClassIdHashCodes.get(player.getClassId().getId()), hashCode) >= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class SubClass
|
||||
|
||||
public int getClassId()
|
||||
{
|
||||
return _class.ordinal();
|
||||
return _class.getId();
|
||||
}
|
||||
|
||||
public long getExp()
|
||||
|
@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
||||
|
||||
for (int _clas : _class)
|
||||
{
|
||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
||||
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||
{
|
||||
ok = true;
|
||||
break;
|
||||
|
@ -87,9 +87,9 @@ public class RequestCrystallizeItem implements IClientIncomingPacket
|
||||
{
|
||||
client.sendPacket(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
if ((player.getRace() != Race.DWARF) && (player.getClassId().ordinal() != 117) && (player.getClassId().ordinal() != 55))
|
||||
if ((player.getRace() != Race.DWARF) && (player.getClassId().getId() != 117) && (player.getClassId().getId() != 55))
|
||||
{
|
||||
LOGGER.info("Player " + player + " used crystalize with classid: " + player.getClassId().ordinal());
|
||||
LOGGER.info("Player " + player + " used crystalize with classid: " + player.getClassId().getId());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user