Use ClassId getId instead of ordinal.
This commit is contained in:
Vendored
+1
-1
@@ -1147,7 +1147,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1569,7 +1569,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// 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 int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1571,7 +1571,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1683,7 +1683,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1166,7 +1166,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1571,7 +1571,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1683,7 +1683,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1059,7 +1059,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
Vendored
+1
-1
@@ -92,7 +92,7 @@ public class Q00182_NewRecruits extends Quest
|
|||||||
{
|
{
|
||||||
htmltext = "32138-00.html";
|
htmltext = "32138-00.html";
|
||||||
}
|
}
|
||||||
else if ((level >= 17) && (level <= 21) && (player.getClassId().ordinal() == 0))
|
else if ((level >= 17) && (level <= 21) && (player.getClassId().getId() == 0))
|
||||||
{
|
{
|
||||||
htmltext = "32138-01.htm";
|
htmltext = "32138-01.htm";
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1170,7 +1170,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1272,7 +1272,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final int hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
final int 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -83,9 +83,9 @@ public class RequestCrystallizeItem implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
player.sendPacket(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
player.sendPacket(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
player.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 " + client + " used crystalize with classid: " + player.getClassId().ordinal());
|
LOGGER.info("Player " + client + " used crystalize with classid: " + player.getClassId().getId());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
Vendored
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1131,7 +1131,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
+1
-1
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java
Vendored
+1
-1
@@ -1143,7 +1143,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
|||||||
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
adminReply.replace("%xp%", String.valueOf(player.getExp()));
|
||||||
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
adminReply.replace("%sp%", String.valueOf(player.getSp()));
|
||||||
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
adminReply.replace("%class%", ClassListData.getInstance().getClass(player.getClassId()).getClientCode());
|
||||||
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().ordinal()));
|
adminReply.replace("%ordinal%", String.valueOf(player.getClassId().getId()));
|
||||||
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
adminReply.replace("%classid%", String.valueOf(player.getClassId()));
|
||||||
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
adminReply.replace("%baseclass%", ClassListData.getInstance().getClass(player.getBaseClass()).getClientCode());
|
||||||
adminReply.replace("%x%", String.valueOf(player.getX()));
|
adminReply.replace("%x%", String.valueOf(player.getX()));
|
||||||
|
|||||||
+2
-2
@@ -1557,7 +1557,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
tempMap.clear();
|
tempMap.clear();
|
||||||
Arrays.sort(array);
|
Arrays.sort(array);
|
||||||
_skillsByClassIdHashCodes.put(cls.ordinal(), array);
|
_skillsByClassIdHashCodes.put(cls.getId(), array);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Race specific skills from Fishing and Transformation skill trees.
|
// Race specific skills from Fishing and Transformation skill trees.
|
||||||
@@ -1669,7 +1669,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
final int maxLvl = SkillData.getInstance().getMaxLevel(skill.getId());
|
||||||
final long hashCode = SkillData.getSkillHashCode(skill.getId(), Math.min(skill.getLevel(), maxLvl));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SubClass
|
|||||||
|
|
||||||
public int getClassId()
|
public int getClassId()
|
||||||
{
|
{
|
||||||
return _class.ordinal();
|
return _class.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getExp()
|
public long getExp()
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ public abstract class ZoneType extends ListenersContainer
|
|||||||
|
|
||||||
for (int _clas : _class)
|
for (int _clas : _class)
|
||||||
{
|
{
|
||||||
if (((PlayerInstance) creature).getClassId().ordinal() == _clas)
|
if (((PlayerInstance) creature).getClassId().getId() == _clas)
|
||||||
{
|
{
|
||||||
ok = true;
|
ok = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -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(SystemMessageId.YOU_MAY_NOT_CRYSTALLIZE_THIS_ITEM_YOUR_CRYSTALLIZATION_SKILL_LEVEL_IS_TOO_LOW);
|
||||||
client.sendPacket(ActionFailed.STATIC_PACKET);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user