No need for setActiveClass to return boolean.
This commit is contained in:
parent
b764d444df
commit
38d932ec9d
@ -9782,13 +9782,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9796,7 +9795,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9851,7 +9850,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9936,7 +9935,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9789,13 +9789,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9803,7 +9802,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9858,7 +9857,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9943,7 +9942,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9774,13 +9774,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9788,7 +9787,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9843,7 +9842,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9928,7 +9927,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9801,13 +9801,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9815,7 +9814,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9870,7 +9869,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9955,7 +9954,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9801,13 +9801,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9815,7 +9814,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9870,7 +9869,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9955,7 +9954,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9696,13 +9696,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9710,7 +9709,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9765,7 +9764,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9849,7 +9848,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -9789,13 +9789,12 @@ public class PlayerInstance extends Playable
|
||||
* An index of zero specifies the character's original (base) class, while indexes 1-3 specifies the character's sub-classes respectively.<br>
|
||||
* <font color="00FF00"/>WARNING: Use only on subclase change</font>
|
||||
* @param classIndex
|
||||
* @return
|
||||
*/
|
||||
public boolean setActiveClass(int classIndex)
|
||||
public void setActiveClass(int classIndex)
|
||||
{
|
||||
if (!_subclassLock.tryLock())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@ -9803,7 +9802,7 @@ public class PlayerInstance extends Playable
|
||||
// Cannot switch or change subclasses while transformed
|
||||
if (isTransformed())
|
||||
{
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove active item skills before saving char to database
|
||||
@ -9858,7 +9857,7 @@ public class PlayerInstance extends Playable
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.WARNING, "Could not switch " + getName() + "'s sub class to class index " + classIndex + ": " + e.getMessage(), e);
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_classIndex = classIndex;
|
||||
@ -9943,7 +9942,7 @@ public class PlayerInstance extends Playable
|
||||
sendPacket(new ExStorageMaxCount(this));
|
||||
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerSubChange(this), this);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user