Removed subclassLock from modifySubClass method.
This commit is contained in:
@@ -9592,14 +9592,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9670,14 +9662,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9595,14 +9595,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9673,14 +9665,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9597,14 +9597,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9675,14 +9667,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9588,14 +9588,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9666,14 +9658,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9612,14 +9612,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9690,14 +9682,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9612,14 +9612,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9690,14 +9682,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9618,14 +9618,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9696,14 +9688,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9633,14 +9633,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9711,14 +9703,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9735,14 +9735,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9813,14 +9805,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9761,14 +9761,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9839,14 +9831,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9811,14 +9811,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9889,14 +9881,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -10160,14 +10160,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement deleteHennas = con.prepareStatement(DELETE_CHAR_HENNAS);
|
||||
@@ -10218,11 +10210,6 @@ public class Player extends Playable
|
||||
}
|
||||
|
||||
getSubClasses().remove(classIndex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex);
|
||||
}
|
||||
|
||||
@@ -10043,14 +10043,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement deleteHennas = con.prepareStatement(DELETE_CHAR_HENNAS);
|
||||
@@ -10101,11 +10093,6 @@ public class Player extends Playable
|
||||
}
|
||||
|
||||
getSubClasses().remove(classIndex);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex);
|
||||
}
|
||||
|
||||
@@ -9494,14 +9494,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9572,14 +9564,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9494,14 +9494,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9572,14 +9564,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9480,14 +9480,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9558,14 +9550,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9507,14 +9507,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9585,14 +9577,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9507,14 +9507,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9585,14 +9577,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9461,14 +9461,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9539,14 +9531,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
@@ -9482,14 +9482,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9560,14 +9552,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9626,14 +9626,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9704,14 +9696,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9692,14 +9692,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9770,14 +9762,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
-16
@@ -9692,14 +9692,6 @@ public class Player extends Playable
|
||||
* @return {@code true} if the sub-class was modified, {@code false} otherwise
|
||||
*/
|
||||
public boolean modifySubClass(int classIndex, int newClassId, boolean isDualClass)
|
||||
{
|
||||
if (_subclassLock)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
_subclassLock = true;
|
||||
|
||||
try
|
||||
{
|
||||
// Notify to scripts before class is removed.
|
||||
if (!getSubClasses().isEmpty()) // also null check
|
||||
@@ -9770,14 +9762,6 @@ public class Player extends Playable
|
||||
LOGGER.log(Level.WARNING, "Could not modify sub class for " + getName() + " to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_subclassLock = false;
|
||||
getStat().recalculateStats(false);
|
||||
updateAbnormalVisualEffects();
|
||||
sendSkillList();
|
||||
}
|
||||
|
||||
return addSubClass(newClassId, classIndex, isDualClass);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user